Skip to content

app build and docker build run twice after semantic release

when we do a semantic release, it will create a commit and pushes to master and it will create a tag.

both will trigger a app-build and docker-build.

The rule to exclude both tags and semantic release is this:

.not-after-semantic-release: &not-after-semantic-release
  except:
    refs:
      - tags
    variables:
      - $CI_COMMIT_MESSAGE =~ /^chore.*/

so my attempt was to do:

.not-after-semantic-release-commit: &not-after-semantic-release-commit
  except:
    variables:
      - $CI_COMMIT_MESSAGE =~ /^chore.*/

but this does not work, because this will also exclude the tag because CI_COMMIT_MESSAGE will still be the chore message