Skip to content

Commit

Permalink
🚀 ci: update publish job to trigger on version tags
Browse files Browse the repository at this point in the history
  • Loading branch information
esolitos authored and gitbutler-client committed Dec 2, 2024
1 parent 5f6fb46 commit a07b3fe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Ansible CI
on:
push:
branches: [ master ]
tags: [ 'v*' ]
pull_request:
branches: [ master ]

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a07b3fe

Please sign in to comment.