Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# This works for PUSH but not PULL_REQUEST
if: "!contains(github.event.head_commit.message, '[skipci]')"
# So down here in the STEP, grab the commit message via git log
# But now how do I EXIT the workflow??
- name: Skip if commit contains skipci
run: |
commitmsg=$(git log --format=%B -n 1 ${{ github.event.after }})
if [[ $commitmsg =~ \[skipci\] ]]; then
echo "::debug::Skipping run because commit contained [skipci]"
# FIXME: Kill job?
echo "exit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment