-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.07 KB
/
galaxy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
#
# Ansible managed
#
name: Release role to Ansible Galaxy
'on':
release:
types: [ edited, published ]
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-20.04
steps:
- name: Checkout Git Repo
uses: actions/checkout@v2
- name: "Set up Python 3.9"
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Generate cache keys
id: keys
run: |
echo ::set-output name=pip_cache_dir::$(pip cache dir)
echo ::set-output name=date::$(date +%Y_%g)
- name: Pip Cache
uses: actions/cache@v2
with:
path: ${{ steps.keys.outputs.pip_cache_dir }}
key: ansible-pip-${{ steps.keys.outputs.date }}
- name: Install pip packages
run: |
pip3 install -U pip
pip3 install wheel
pip3 install ansible-core
- name: Galaxy import
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)