Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/docs/ssri-6.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
colebemis authored Sep 28, 2021
2 parents eb6b597 + 7e26fa7 commit 23304c6
Show file tree
Hide file tree
Showing 100 changed files with 27,247 additions and 39,782 deletions.
4 changes: 0 additions & 4 deletions .eslintrc.json

This file was deleted.

6 changes: 0 additions & 6 deletions .github/actions/build_node/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ npm install
echo "**************** Building ****************"
npm run build

echo "**************** Linting ****************"
npm run lint

echo "**************** Testing ****************"
npm run test

{
echo "**************** Publishing ****************"
npm version --allow-same-version $PACKAGE_VERSION && npm publish --tag $PUBLISH_TAG --access public
Expand Down
6 changes: 0 additions & 6 deletions .github/actions/build_ruby/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ perl -pi -e "s/\"octicons\", \"[^\"]+\"/\"octicons\", \"${PACKAGE_VERSION}\"/" .
echo "**************** Installing ****************"
bundle install

echo "**************** Linting ****************"
bundle exec rake lint

echo "**************** Testing ****************"
bundle exec rake test

echo "**************** Versioning ****************"
bundle exec rake version\["$PACKAGE_VERSION"\]

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/push.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
on:
push:
pull_request:
branches:
- main
pull_request:
branches-ignore:
- 'dependabot/**'
name: Octicons Build
jobs:
setup:
Expand All @@ -17,8 +19,6 @@ jobs:
- run: npm install
- run: npm run build
- run: cp -r icons lib/build/svg
- run: npm run lint
- run: npm test
- uses: actions/upload-artifact@master
with:
name: octicons
Expand Down
165 changes: 165 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
name: CI
on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- run: yarn
- name: Building
run: yarn build
- run: cp -r icons lib/build/svg
- uses: actions/upload-artifact@v2
with:
name: octicons-build
path: ./lib/build

main:
name: Main project
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- uses: actions/download-artifact@v2
with:
name: octicons-build
path: ./lib/build
- run: yarn
- name: Lint
run: yarn lint
- name: Test
run: yarn test

octicons_node:
name: 'npm:@primer/octicons'
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./lib/octicons_node
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- uses: actions/download-artifact@v2
with:
name: octicons-build
path: ./lib/build
- run: yarn
- name: Building
run: yarn build
- name: Lint
run: yarn lint
- name: Test
run: yarn test

octicons_react:
name: 'npm:@primer/octicons-react'
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./lib/octicons_react
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 14
- uses: actions/download-artifact@v2
with:
name: octicons-build
path: ./lib/build
- run: yarn
- name: Building
run: yarn build
- name: Lint
run: yarn lint
- name: Test
run: yarn test

octicons_gem:
name: 'gem:octicons'
needs: build
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./lib/octicons_gem
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/download-artifact@v2
with:
name: octicons-build
path: ./lib/octicons_gem/lib/build
- run: bundle install
- name: Linting
run: bundle exec rake lint
- name: Testing
run: bundle exec rake test
- name: Build
run: bundle exec rake build
- uses: actions/upload-artifact@master
with:
name: octicons-gem
path: ./lib/octicons_gem/pkg

octicons_helper:
name: 'gem:octicons_helper'
needs: octicons_gem
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./lib/octicons_helper
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/download-artifact@v2
with:
name: octicons-gem
path: ./lib/octicons_helper/vendor/cache
- run: bundle install
- name: Linting
run: bundle exec rake lint
- name: Testing
run: bundle exec rake test

octicons_jekyll:
name: 'gem:octicons_jekyll'
needs: octicons_gem
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./lib/octicons_jekyll
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/download-artifact@v2
with:
name: octicons-gem
path: ./lib/octicons_jekyll/vendor/cache
- run: bundle install
- name: Linting
run: bundle exec rake lint
- name: Testing
run: bundle exec rake test
52 changes: 52 additions & 0 deletions .github/workflows/deploy_preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy
on:
push:
branches-ignore:
- 'main'
- 'dependabot/**'
paths:
- 'lib/**'
- 'icons/**'
- 'docs/**'
- '.github/workflows/deploy*.yml'
- 'package.json'
jobs:
deploy-preview:
if: ${{ github.repository == 'primer/octicons' }}
name: Preview
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: chrnorm/[email protected]
name: Create GitHub deployment
id: deployment
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: Preview

- name: Vercel Action
uses: amondnet/vercel-action@v20
id: vercel-action
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-token: ${{ secrets.VERCEL_TOKEN_SHARED }}
github-comment: false
vercel-org-id: ${{ secrets.VERCEL_ORG_ID_SHARED }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}

- name: Update deployment status (success)
if: success()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment_url: ${{ steps.vercel-action.outputs.preview-url }}
state: "success"
deployment_id: ${{ steps.deployment.outputs.deployment_id }}

- name: Update deployment status (failure)
if: failure()
uses: chrnorm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
state: "failure"
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
29 changes: 29 additions & 0 deletions .github/workflows/deploy_production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy
on:
push:
branches:
- 'main'
paths:
- 'lib/**'
- 'icons/**'
- 'docs/**'
- '.github/workflows/deploy*.yml'
- 'package.json'
jobs:
deploy:
if: ${{ github.repository == 'primer/octicons' }}
name: Production
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Vercel Action
uses: amondnet/vercel-action@v20
id: vercel-action
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-token: ${{ secrets.VERCEL_TOKEN_SHARED }}
vercel-args: '--prod'
github-comment: false
vercel-org-id: ${{ secrets.VERCEL_ORG_ID_SHARED }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
6 changes: 5 additions & 1 deletion .github/workflows/optimize.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
on: push
on:
push:
paths:
- 'icons/**'
- '.github/workflows/optimize.yml'
name: Optimize SVGs
jobs:
optimize:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Stale
on:
schedule:
- cron: '0 * * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
with:

# General settings
days-before-stale: 60
days-before-close: 7
enable-statistics: true
operations-per-run: 100
remove-stale-when-updated: true

# PR specific settings
delete-branch: true
stale-pr-message: "Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days."

# Issue specific settings
days-before-issue-stale: 180
stale-issue-message: "Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days."
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.gem
*.lock
/package-lock.json
*.log
.DS_Store
.bundle
Expand All @@ -15,4 +15,4 @@ public
.cache

# Now
.now
.now
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
save-exact=true
package-lock=false
Loading

0 comments on commit 23304c6

Please sign in to comment.