From a07b3fe0d7ce4e070cb6b08edf13d368e701f322 Mon Sep 17 00:00:00 2001 From: Marlon Saglia Date: Mon, 2 Dec 2024 11:27:33 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20ci:=20update=20publish=20job=20t?= =?UTF-8?q?o=20trigger=20on=20version=20tags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/main.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 766229b..f25c716 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,6 +3,7 @@ name: Ansible CI on: push: branches: [ master ] + tags: [ 'v*' ] pull_request: branches: [ master ] @@ -31,8 +32,8 @@ jobs: run: ${PWD}/tests/test-ansible-role.sh -d ${{ matrix.distro }} publish: - # Run this job only if the push event is triggered on the default branch - if: github.event_name == 'push' && github.ref == ${{ github.event.repository.default_branch }} + # Run this job only if the push event is triggered by a tag. + if: github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v') needs: - test runs-on: ubuntu-latest