ci: Add Ansible Galaxy publishing workflow #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish to Ansible Galaxy | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
environment: publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Build | |
run: ansible-galaxy collection build | |
- name: Publish to Ansible Galaxy | |
run: ansible-galaxy collection publish *.tar.gz --api-key ${{ secrets.ANSIBLE_GALAXY_TOKEN }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ansible-dvls-collection | |
path: '*.tar.gz' |