2024-04-14 19:12:40 +02:00
|
|
|
---
|
|
|
|
|
|
|
|
name: Ansible Galaxy
|
|
|
|
|
2024-04-14 19:56:19 +02:00
|
|
|
on: # noqa yaml[truthy]
|
2024-04-14 19:12:40 +02:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
2024-04-14 19:25:36 +02:00
|
|
|
runs-on: docker
|
2024-04-14 19:12:40 +02:00
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/checkout@v4
|
2024-04-14 19:25:36 +02:00
|
|
|
|
2024-04-14 19:12:40 +02:00
|
|
|
- name: Set version in galaxy.yml
|
|
|
|
run: |
|
|
|
|
VERSION=${GITHUB_REF#refs/tags/v}
|
|
|
|
sed -re "s/^version:.*$/version: ${VERSION}/" -i galaxy.yml
|
2024-04-14 19:25:36 +02:00
|
|
|
|
2024-04-14 20:15:43 +02:00
|
|
|
- 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-nextcloud*tar.gz
|