Skip to content

Commit ffafd84

Browse files
committed
Add GH workflows for lint and release
1 parent c4d1751 commit ffafd84

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/lint.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: ansible-lint
2+
on: [pull_request_target]
3+
jobs:
4+
ansible-lint:
5+
name: ansible-lint
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
10+
- uses: actions/setup-python@v2
11+
with:
12+
python-version: '3.x'
13+
14+
- name: ansible-lint
15+
uses: reviewdog/action-ansiblelint@v1
16+
with:
17+
github_token: ${{ secrets.GITHUB_TOKEN }}
18+
reporter: github-pr-review
19+
filter_mode: nofilter

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
# This workflow requires a GALAXY_API_KEY secret present in the GitHub
3+
# repository or organization.
4+
#
5+
# See: https://github.com/marketplace/actions/publish-ansible-role-to-galaxy
6+
# See: https://github.com/ansible/galaxy/issues/46
7+
8+
name: Release
9+
10+
'on':
11+
push:
12+
tags:
13+
- '*'
14+
15+
jobs:
16+
release:
17+
name: Release
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Check out the codebase.
21+
uses: actions/checkout@v2
22+
23+
- name: Set up Python 3.
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: '3.x'
27+
28+
- name: Install Ansible.
29+
run: pip3 install ansible-base
30+
31+
- name: Trigger a new import on Galaxy.
32+
run: ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }} $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2) --branch main

0 commit comments

Comments
 (0)