Skip to content

Commit

Permalink
fix(continuous-integration): set build input as optionnal
Browse files Browse the repository at this point in the history
Signed-off-by: Emilien Escalle <[email protected]>
  • Loading branch information
neilime committed Mar 29, 2024
1 parent 19e42c6 commit 1b261c2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:

build:
name: 🏗️ Build
if: inputs.checks == true && needs.setup.outputs.build-commands
if: inputs.checks == true
runs-on: "ubuntu-latest"
needs: setup
# jscpd:ignore-start
Expand All @@ -183,25 +183,30 @@ jobs:
steps:
# FIXME: This is a workaround for having workflow ref. See https://github.com/orgs/community/discussions/38659
- uses: hoverkraft-tech/ci-github-common/actions/[email protected]
if: needs.setup.outputs.build-commands

- id: oidc
if: needs.setup.outputs.build-commands
uses: ChristopherHX/oidc@v3
- uses: actions/checkout@v4 # checks out called workflow
if: needs.setup.outputs.build-commands
with:
path: ./self-workflow
repository: ${{ steps.oidc.outputs.job_workflow_repo_name_and_owner }}
ref: ${{ steps.oidc.outputs.job_workflow_repo_ref }}
# jscpd:ignore-end

- id: setup-node
if: needs.setup.outputs.build-commands
uses: ./self-workflow/actions/setup-node
with:
dependencies-cache: |
nx
gatsby
storybook
- run: |
- if: needs.setup.outputs.build-commands
run: |
BUILD_COMMANDS="${{ needs.setup.outputs.build-commands }}"
echo "$BUILD_COMMANDS" | while IFS= read -r COMMAND ; do
Expand All @@ -219,7 +224,7 @@ jobs:
env:
NX_REJECT_UNKNOWN_LOCAL_CACHE: "0"

- if: needs.setup.outputs.build-artifact
- if: needs.setup.outputs.build-commands && needs.setup.outputs.build-artifact
uses: actions/upload-artifact@v4
with:
name: build
Expand Down

0 comments on commit 1b261c2

Please sign in to comment.