DEV Community

Discussion on: [skip ci] for GitHub Actions

Collapse
 
jannikwempe profile image
Jannik Wempe

Since I just had troubles using this, a quick reminder: the code above will check all commits in github.event.commits (which could be more than just the latest commit!) for [skip ci]. Therefore a workflow was skipped with a commit not having [skip ci] in the commit message, which was not intended...

If you want to just check the latest commit, change it to:

jobs:
  build:
    runs-on: ubuntu-latest
    if: "!contains(github.event.head_commit.message, '[ci skip]')"
Enter fullscreen mode Exit fullscreen mode
Collapse
 
epassaro profile image
epassaro • Edited

Thank you!.

This change has already been added to the original post.