Skip to content

Commit

Permalink
build(gha): replace vars reference in composite action
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Mar 1, 2024
1 parent 550a8ed commit c9a27d7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
name: 'Create build'
description: 'Sets up environment and creates a build'

inputs:
node-version:
description: 'Node version to use'
required: true

runs:
using: composite
steps:
- uses: myparcelnl/actions/yarn-install@v4
with:
node-version: ${{ vars.NODE_VERSION }}
node-version: ${{ inputs.node-version }}

- name: 'Build packages'
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
- uses: actions/checkout@v4

- uses: ./.github/actions/build
with:
node-version: ${{ vars.NODE_VERSION }}

- uses: myparcelnl/actions/setup-git-credentials@v4
id: credentials
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
token: ${{ secrets.GH_REPO_TOKEN }}

- uses: ./.github/actions/build
with:
node-version: ${{ vars.NODE_VERSION }}

- uses: actions/upload-pages-artifact@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
- uses: actions/checkout@v4

- uses: ./.github/actions/build
with:
node-version: ${{ vars.NODE_VERSION }}

- name: 'Run tests'
shell: bash
Expand Down

0 comments on commit c9a27d7

Please sign in to comment.