Skip to content

Commit

Permalink
ci: make publication only run with tags
Browse files Browse the repository at this point in the history
Signed-off-by: Alex <aizquier@redhat.com>
  • Loading branch information
Alex-Izquierdo committed Nov 18, 2024
1 parent 2cd670a commit 3598141
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ jobs:
needs:
- check
environment: release
if: github.event_name == 'push' && github.ref_type == 'tag'
steps:
- uses: actions/checkout@v4

Expand All @@ -266,9 +267,6 @@ jobs:
- run: pip install ansible-core

- name: Publish the collection on Galaxy
if: |
github.event_name == 'push' &&
(github.ref_type == 'tag' || github.ref == 'refs/heads/main')
run: >
[[ "${{ secrets.ANSIBLE_GALAXY_API_KEY != '' }}" ]] || { echo
"ANSIBLE_GALAXY_API_KEY is required to publish on galaxy" ; exit 1; }
Expand All @@ -277,7 +275,6 @@ jobs:
secrets.ANSIBLE_GALAXY_API_KEY }}"
- name: Upload the artifact to the release
if: github.ref_type == 'tag'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down

0 comments on commit 3598141

Please sign in to comment.