Skip to content

Commit

Permalink
fix publishing to galaxy
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhoesel committed May 25, 2022
1 parent 56e0f21 commit 2e5cd72
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,11 @@ jobs:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Build collection and rename the archive
- name: Build collection and get tarball filename
id: collection_build
run: |
ansible-galaxy collection build --force
mv *.tar.gz collection.tar.gz
echo "::set-output name=collection-tarball::$(ls | grep ".tar.gz")"
- name: Get current release
id: get_release
Expand All @@ -156,9 +157,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: collection.tar.gz
asset_path: ${{ steps.collection_build.outputs.collection-tarball }}
asset_name: ${{ github.event.repository.name }}-${{ steps.get_release.outputs.tag_name }}.tar.gz
asset_content_type: application/tar+gzip

- name: Deploy Ansible collection to Galaxy
run: ansible-galaxy collection publish collection.tar.gz --api-key ${{ secrets.GALAXY_API_KEY }}
run: ansible-galaxy collection publish ${{ steps.collection_build.outputs.collection-tarball }} --api-key ${{ secrets.GALAXY_API_KEY }}

0 comments on commit 2e5cd72

Please sign in to comment.