-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (33 loc) · 991 Bytes
/
ansible.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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Ansible
on:
push:
branches:
- main
paths:
- 'ansible/**'
- '.github/workflows/ansible.yml'
pull_request:
branches:
- main
paths:
- 'ansible/**'
- '.github/workflows/ansible.yml'
env:
ANSIBLE_ROLES_PATH: ansible/roles
jobs:
linting:
name: Linting
runs-on: ubuntu-latest
steps:
# checkout
- uses: actions/checkout@v4
# workaround: ensure git directory exists in working directory, ansible action requires this
- name: Symlink Git directory to ansible working directory
run: |
ln -s ${{ github.workspace }}/.git ${{ github.workspace }}/ansible/.git
ln -s ${{ github.workspace }}/.ansible-lint ${{ github.workspace }}/ansible/.ansible-lint
# lint ansible
- uses: ansible/[email protected]
with:
working_directory: ${{ github.workspace }}/ansible