Skip to content

Commit 9933ead

Browse files
add publishing to galaxy
1 parent 490a86f commit 9933ead

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Publish Ansible Role
3+
4+
on:
5+
- push
6+
7+
#on:
8+
# push:
9+
# tags:
10+
# - "*" # publish on any tag
11+
12+
jobs:
13+
publish:
14+
runs-on: ubuntu-latest
15+
env:
16+
SECRET: ${{ secrets.GALAXY_API_KEY }}
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v5
23+
with:
24+
python-version: "3.x"
25+
26+
- name: Install Ansible
27+
run: pip install ansible
28+
29+
- name: Trigger a new import on Galaxy.
30+
run: >-
31+
ansible-galaxy role import --api-key $SECRET
32+
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)

0 commit comments

Comments
 (0)