mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 20:03:04 +00:00
389038d37f
Signed-off-by: gardar <gardar@users.noreply.github.com>
32 lines
815 B
YAML
32 lines
815 B
YAML
---
|
|
name: Ansible collection publish
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- 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
|
|
|
|
- name: "Publish collection on galaxy"
|
|
uses: ansible/ansible-publish-action@v1
|
|
with:
|
|
api_key: ${{ secrets.ANSIBLE_GALAXY_API_KEY }}
|