Skip to content

Commit

Permalink
fix: no run on some condition
Browse files Browse the repository at this point in the history
Signed-off-by: Jason C. Leach <[email protected]>
  • Loading branch information
jleach committed Oct 23, 2024
1 parent b26bd7d commit 714ae1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/actions/early-exit-check/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ runs:
shell: bash
run: |
output=$(git diff --name-only origin/main..HEAD | grep -E '^(app/.*)|(.yarn/.*)|(.github/workflows/.*)' | wc -l)
echo "::set-output name=result::$output"
echo "output=$output" >> $GITHUB_ENV
- name: Terminate workflow if output is greater than zero
if: steps.check_output.outputs.result > 0
if: env.output > 0
shell: bash
run: exit 0
5 changes: 5 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,13 @@ jobs:
git branch
- name: Export produciton archive
id: early_exit_check
uses: ./.github/workflows/actions/early-exit-check

- name: Terminate workflow if early exit check passes
if: steps.early_exit_check.outputs.exit == 'true'
run: exit 0

- uses: actions/setup-python@v5
with:
python-version: "3.11"
Expand Down

0 comments on commit 714ae1c

Please sign in to comment.