Skip to content

Commit

Permalink
move shared workflow code into install-yarn-dependencies reusable w…
Browse files Browse the repository at this point in the history
…orkflow
  • Loading branch information
TheAfroOfDoom committed Dec 31, 2023
1 parent fd65aec commit cff1eb3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/install-yarn-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: install-yarn-dependencies

on: workflow_call

jobs:
install-dependencies:
runs-on: ubuntu-latest
steps:
- name: Install Yarn 3.6.3
run: corepack enable
- name: Setup cache
uses: actions/setup-node@v4
with:
cache: 'yarn'
cache-dependency-path: yarn.lock
node-version-file: package.json
- run: yarn
20 changes: 2 additions & 18 deletions .github/workflows/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Yarn 3.6.3
run: corepack enable
- name: Setup cache
uses: actions/setup-node@v4
with:
cache: 'yarn'
cache-dependency-path: yarn.lock
node-version-file: package.json
- run: yarn
- uses: ./.github/workflows/install-yarn-dependencies
- name: Run Prettier
run: yarn start lint.prettier.check

Expand All @@ -24,14 +16,6 @@ jobs:
needs: format
steps:
- uses: actions/checkout@v4
- name: Install Yarn 3.6.3
run: corepack enable
- name: Setup cache
uses: actions/setup-node@v4
with:
cache: 'yarn'
cache-dependency-path: yarn.lock
node-version-file: package.json
- run: yarn
- uses: ./.github/workflows/install-yarn-dependencies
- name: Run ESLint
run: yarn start lint.eslint.check

0 comments on commit cff1eb3

Please sign in to comment.