From da69a8c193bb3a7a3392cd09766e59ac1616c5ef Mon Sep 17 00:00:00 2001 From: Alexis Tyler Date: Sun, 28 Mar 2021 18:54:39 -0700 Subject: [PATCH] fix: use correct field --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ba0e45abd..47f781188 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,11 @@ on: jobs: start: # This prevents a tag running twice as it'll have a "tag" and a "commit" event - if: (startsWith(github.event.base_ref, 'refs/heads/') && !startsWith(github.event.head_commit.message, 'chore(release)')) || (startsWith(github.event.base_ref, 'refs/tags/') && startsWith(github.event.head_commit.message, 'chore(release)')) + if: | + # Commit pushed + (startsWith(github.event.ref, 'refs/heads/') && !startsWith(github.event.head_commit.message, 'chore(release)')) || \ + # Tag pushed + (startsWith(github.event.ref, 'refs/tags/') && startsWith(github.event.head_commit.message, 'chore(release)')) runs-on: ubuntu-latest steps: - name: Validate branch and tag