Skip to content

Commit

Permalink
ci: fix fetch-depth evaluation logic (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLicense authored Jun 25, 2024
1 parent 16031d4 commit 49d1243
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/assets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
repository: ${{ env.REMOTE_REPOSITORY }}
ref: ${{ inputs.ref || null }}
path: app/cdn
fetch-depth: ${{ inputs.ref && 0 || 1 }}
fetch-depth: ${{ !inputs.ref && 1 || 0 }}

- name: Setup Python
uses: actions/setup-python@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
with:
ref: ${{ inputs.ref || null }}
sparse-checkout: infra/terraform
fetch-depth: ${{ inputs.ref && 0 || 1 }}
fetch-depth: ${{ !inputs.ref && 1 || 0 }}

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
with:
ref: ${{ inputs.ref || null }}
sparse-checkout: infra/terraform
fetch-depth: ${{ inputs.ref && 0 || 1 }}
fetch-depth: ${{ !inputs.ref && 1 || 0 }}

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
with:
ref: ${{ inputs.ref || null }}
sparse-checkout: ${{ env.WORKING_DIR }}
fetch-depth: ${{ inputs.ref && 0 || 1 }}
fetch-depth: ${{ !inputs.ref && 1 || 0 }}

- uses: hadolint/[email protected]
with:
Expand All @@ -54,7 +54,7 @@ jobs:
with:
ref: ${{ inputs.ref || null }}
sparse-checkout: ${{ env.WORKING_DIR }}
fetch-depth: ${{ inputs.ref && 0 || 1 }}
fetch-depth: ${{ !inputs.ref && 1 || 0 }}

- uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/php.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
repository: ${{ env.REMOTE_REPOSITORY }}
ref: ${{ inputs.ref || null }}
path: app/${{ inputs.project }}
fetch-depth: ${{ inputs.ref && 0 || 1 }}
fetch-depth: ${{ !inputs.ref && 1 || 0 }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down

0 comments on commit 49d1243

Please sign in to comment.