2023-02-23 12:05:43 +00:00
|
|
|
---
|
|
|
|
name: Ansible collection publish
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- '*'
|
2023-10-27 18:18:38 +00:00
|
|
|
workflow_dispatch:
|
2023-02-23 12:05:43 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-04-25 14:24:37 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-02-23 12:05:43 +00:00
|
|
|
|
|
|
|
- name: "Install tools"
|
|
|
|
run: "python -m pip install ansible-base --disable-pip-version-check"
|
|
|
|
|
|
|
|
- name: "Build the collection"
|
|
|
|
run: ansible-galaxy collection build
|
|
|
|
|
|
|
|
- name: "Upload built collection to release"
|
|
|
|
uses: svenstaro/upload-release-action@v2
|
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: prometheus-prometheus-*.tar.gz
|
|
|
|
file_glob: true
|
|
|
|
tag: ${{ github.ref }}
|
|
|
|
overwrite: true
|
2023-03-03 19:03:47 +00:00
|
|
|
|
|
|
|
- name: "Publish collection on galaxy"
|
2023-03-04 08:09:48 +00:00
|
|
|
uses: ansible/ansible-publish-action@v1.0.0
|
2023-03-03 19:03:47 +00:00
|
|
|
with:
|
|
|
|
api_key: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
|