aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorColin Wilk <colin.wilk@tum.de>2023-05-30 19:48:38 +0200
committerColin Wilk <colin.wilk@tum.de>2023-05-30 19:48:38 +0200
commite3aa52e3ea194a08f1082ed52114b4aea4f47a9b (patch)
tree648d50177e5ff02a7a1f5920b50715bdc784aaad /.github/workflows
parent139a3ebd76e6cb941776b03ead04c98f3a74b7f6 (diff)
downloadansible-role-prometheus-target-e3aa52e3ea194a08f1082ed52114b4aea4f47a9b.tar.gz
ansible-role-prometheus-target-e3aa52e3ea194a08f1082ed52114b4aea4f47a9b.zip
Add github workflow to create ansible-galaxy releases on tag pushesv1.0.0
Signed-off-by: Colin Wilk <colin.wilk@tum.de>
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/release.yml34
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..d71a70a
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,34 @@
+---
+name: Release
+
+'on':
+ push:
+ tags:
+ - '*'
+
+defaults:
+ run:
+ working-directory: kliwniloc.prometheus_target
+jobs:
+
+ release:
+ name: Release
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out the codebase.
+ uses: actions/checkout@v2
+ with:
+ path: kliwniloc.prometheus_target
+
+ - name: Set up Python 3.
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.x
+
+ - name: Install Ansible.
+ run: pip3 install ansible-core
+
+ - name: Trigger a new import on Galaxy.
+ run: >-
+ ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
+ $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)