29 lines
716 B
YAML
29 lines
716 B
YAML
---
|
|
|
|
name: Ansible Galaxy
|
|
|
|
on: # noqa yaml[truthy]
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: docker
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set version in galaxy.yml
|
|
run: |
|
|
VERSION=${GITHUB_REF#refs/tags/v}
|
|
sed -re "s/^version:.*$/version: ${VERSION}/" -i galaxy.yml
|
|
|
|
- name: Upload collection to Ansible Galaxy
|
|
env:
|
|
GALAXY_API_KEY: ${{ secrets.GALAXY_API_KEY }}
|
|
run: |
|
|
apt update; apt install --yes python3-pip
|
|
pip3 install --break-system-packages ansible
|
|
ansible-galaxy collection build
|
|
ansible-galaxy collection publish --api-key=${GALAXY_API_KEY} s3lph-nameserver*tar.gz
|