diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml index 0bc8145c9..a46f2f70e 100644 --- a/.github/workflows/packages.yml +++ b/.github/workflows/packages.yml @@ -55,14 +55,16 @@ jobs: fi mkdir -p ./artifacts ./debs touch ./debs/.placeholder + + # Process tag '%ci:no-build' that may be added as line to commit message. + # Forces CI to cancel current build with status 'passed' + if grep -qiP '^\s*%ci:no-build\s*$' <(git log --format="%B" -n 1 "HEAD"); then + tar cf artifacts/debs-${{ matrix.target_arch }}.tar debs + echo "[!] Force exiting as tag '%ci:no-build' was applied to HEAD commit message." + exit 0 + fi + if [ "${{ github.event_name }}" != "workflow_dispatch" ]; then - # Process tag '%ci:no-build' that may be added as line to commit message. - # Forces CI to cancel current build with status 'passed'. - if grep -qiP '^\s*%ci:no-build\s*$' <(git log --format="%B" -n 1 "HEAD"); then - tar cf artifacts/debs-${{ matrix.target_arch }}.tar debs - echo "[!] Force exiting as tag '%ci:no-build' was applied to HEAD commit message." - exit 0 - fi # Build local Docker image if setup scripts were changed. # Useful for pull requests submitting changes for both build environment and packages. if grep -qP '^scripts/(Dockerfile|setup-android-sdk\.sh|setup-ubuntu\.sh)$' <<< "$CHANGED_FILES"; then