From 08c4888a3303902d6b1e2f7420e75a381e4ac67b Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Mon, 23 Sep 2024 11:30:03 +0100 Subject: [PATCH] Corrected GHA publish condition (#330) --- .github/workflows/tox.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 5d91738d..70328234 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -262,7 +262,9 @@ jobs: - run: pip install ansible-core - name: Publish the collection on Galaxy - if: github.ref_type == 'tag' || github.ref == 'refs/heads/main' + 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; }