Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Commit

Permalink
ci: improve workflow reusability across repositories (#1295)
Browse files Browse the repository at this point in the history
  • Loading branch information
0-vortex committed Nov 5, 2021
1 parent e16dd91 commit 802d9af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 33 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
protected-branch-auto-close: false
watch-files: |
package.json
package-lock.json
npm-shrinkwrap.json
body-comment: >
## Issue Reference
Expand All @@ -49,11 +50,11 @@ jobs:
[Contributing Guide](https://docs.opensauced.pizza/contributing/getting-started/).
We would suggest that you close this PR and implement your changes as
described in our Contributing Guide and open a new pull request.

welcome:
runs-on: ubuntu-latest
needs: semantics
if: github.event.action == 'opened'

steps:
- uses: actions/first-interaction@v1
with:
Expand Down
34 changes: 2 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/npm-shrinkwrap.json') }}
key: ${{ runner.os }}-node-${{ hashFiles('**/npm-shrinkwrap.json', '**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
Expand Down Expand Up @@ -92,35 +92,6 @@ jobs:
name: build
path: build

lint:
name: Code standards
runs-on: ubuntu-latest
steps:
- name: "鈽侊笍 checkout repository"
uses: actions/checkout@v2

- name: "馃敡 setup node"
uses: actions/setup-node@v2.1.5
with:
node-version: 16

- name: "馃敡 setup cache"
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/npm-shrinkwrap.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: "馃敡 install npm@latest"
run: npm i -g npm@latest

- name: "馃摝 install dependencies"
run: npm ci

- name: "馃攳 lint code"
run: npm run lint

release:
environment:
name: production
Expand All @@ -129,7 +100,6 @@ jobs:
needs:
- docker
- build
- lint
runs-on: ubuntu-latest
steps:
- name: "鈽侊笍 checkout repository"
Expand All @@ -146,7 +116,7 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/npm-shrinkwrap.json') }}
key: ${{ runner.os }}-node-${{ hashFiles('**/npm-shrinkwrap.json', '**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
Expand Down

0 comments on commit 802d9af

Please sign in to comment.