Skip to content

Commit

Permalink
ci: ghrelease proper cancelation
Browse files Browse the repository at this point in the history
  • Loading branch information
Calychas committed Nov 22, 2023
1 parent b13e107 commit 59cf084
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ jobs:
run: echo COMMIT_MESSAGE="$(git log -1 --pretty=%B | cat)" >> "$GITHUB_OUTPUT"
- name: Cancel run if not a release commit
run: |
(${{ contains(steps.get-last-commit-message.outputs.COMMIT_MESSAGE, format('chore(CI/CD){0} bump version', ':')) }} &&
gh run cancel ${{ github.run_id }} &&
gh run watch ${{ github.run_id }}) || true
IS_RELEASE_COMMIT="${{ contains(steps.get-last-commit-message.outputs.COMMIT_MESSAGE, format('chore(CI/CD){0} bump version', ':')) }}"
if ! $IS_RELEASE_COMMIT; then
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }})
fi
- name: Configure Git user
run: |
git config --local user.name "Kraina CI/CD"
Expand Down

0 comments on commit 59cf084

Please sign in to comment.