Skip to content

Commit

Permalink
ci: move corepack to earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
Swiftwork committed Jun 3, 2024
1 parent c3f10e7 commit 4792ce7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .github/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,10 @@ inputs:
description: 'Cache yarn install state, might speed up resolution step when node-modules cache is activated (invalidated lock/os/node-version/branch)'
required: false
default: 'false'
enable-corepack:
description: 'Enable corepack'
required: false
default: 'true'

runs:
using: 'composite'
steps:
- name: ⚙️ Enable corepack
if: inputs.enable-corepack == 'true'
shell: bash
working-directory: ${{ inputs.cwd }}
run: corepack enable

- name: ⚙️ Expose yarn config as "$GITHUB_OUTPUT"
id: yarn-config
shell: bash
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ jobs:
git config --global user.name "GitHub Action"
git config --global user.email "[email protected]"
- name: ⚙️ Enable corepack
if: inputs.enable-corepack == 'true'
shell: bash
working-directory: ${{ inputs.cwd }}
run: corepack enable

- name: Set up Node.js version 20.x
uses: actions/setup-node@v4
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ jobs:
- name: Check out source code
uses: actions/checkout@v4

- name: ⚙️ Enable corepack
if: inputs.enable-corepack == 'true'
shell: bash
working-directory: ${{ inputs.cwd }}
run: corepack enable

- name: Set up Node.js version ${{ matrix.node }}
uses: actions/setup-node@v4
with:
Expand Down

0 comments on commit 4792ce7

Please sign in to comment.