Skip to content

Release

Release #2

Workflow file for this run

---
name: Release
on: # yamllint disable-line rule:truthy
release:
types: [published]
jobs:
release_ah:
runs-on: ubuntu-latest
environment: ah
steps:
- uses: actions/checkout@v3
- name: "Publish collection on ah"
run: |
ansible-galaxy collection build -v --force
TARBALL=$(ls -1 ./*.tar.gz)
cat << EOF > ansible.cfg
[galaxy]
server_list = rh_automation_hub
[galaxy_server.rh_automation_hub]
url=https://cloud.redhat.com/api/automation-hub/
auth_url=https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
token=${{ secrets.AH_TOKEN }}
EOF
ansible-galaxy collection publish "${TARBALL}"