google.cloud/.github/workflows/automationhub.yml
Yusuke Tsutsumi 3fb4763e37 fix automation hub workflow
The automation hub workflow was passing an incorrect API key.
2022-12-05 09:08:39 -08:00

25 lines
708 B
YAML

name: Upload release to Automation Hub
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ansible
- name: Build and publish
env:
ANSIBLE_AUTOMATION_HUB_API_KEY: ${{ secrets.ANSIBLE_AUTOMATION_HUB_API_KEY }}
run: |
ansible-galaxy collection build .
ansible-galaxy collection publish *.tar.gz --api-key=$ANSIBLE_AUTOMATION_HUB_API_KEY -s=https://cloud.redhat.com/api/automation-hub/