Skip to content

Commit

Permalink
GHA: Compile: Renames cleanup input to skip_cleanup with negated logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Apr 22, 2024
1 parent eb4ccae commit cf7b42b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Compile

env:
ARTIFACT_PREFIX: ${{ inputs.artifact_prefix || 'mt' }}
CLEANUP: ${{ inputs.cleanup == true }}
INDI_COMMON_WORKDIR: ${{ vars.INDI_COMMON_WORKDIR || 'indicators-common' }}
REPOSITORY: EA31337/EA31337-indicators-common
SKIP_CLEANUP: ${{ inputs.skip_cleanup || false }}

# yamllint disable-line rule:truthy
on:
Expand All @@ -30,9 +30,9 @@ on:
description: Artifact prefix.
required: false
type: string
cleanup:
default: true
description: Whether to run clean-up job.
skip_cleanup:
default: false
description: Whether to skip a clean-up job.
required: false
type: boolean

Expand Down Expand Up @@ -159,12 +159,11 @@ jobs:
timeout-minutes: 30

cleanup:
if: ${{ !!(inputs.cleanup == false) }}
if: inputs.skip_cleanup != true
name: Clean-up
needs: [compile-indicators]
runs-on: ubuntu-latest
steps:
- if: env.CLEANUP && github.repository == env.REPOSITORY
uses: geekyeggo/delete-artifact@v5
- uses: geekyeggo/delete-artifact@v5
with:
name: ${{ env.ARTIFACT_PREFIX }}*
2 changes: 1 addition & 1 deletion .github/workflows/run-price.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: ./.github/workflows/compile.yml
with:
artifact_prefix: mt
cleanup: false
skip_cleanup: true

compile-strategy:
defaults:
Expand Down

0 comments on commit cf7b42b

Please sign in to comment.