forked from infra/ansible
Update CI definition
Split jobs in two and use newer versions of actions Signed-off-by: Michal Konecny <mkonecny@redhat.com>
This commit is contained in:
parent
7f8896885d
commit
e6779e021a
1 changed files with 24 additions and 6 deletions
|
|
@ -1,24 +1,24 @@
|
|||
name: Linter
|
||||
on: [push, pull-request]
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
yamllint:
|
||||
runs-on: infra-1
|
||||
container:
|
||||
image: fedora:latest
|
||||
image: quay.io/fedora/fedora:latest
|
||||
steps:
|
||||
- name: Install testing tools
|
||||
run: |
|
||||
dnf install -y yamllint ansible-lint
|
||||
dnf install -y yamllint
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
uses: https://code.forgejo.org/actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v42
|
||||
uses: https://code.forgejo.org/tj-actions/changed-files@v47
|
||||
|
||||
- name: Run yamllint
|
||||
if: steps.changed-files.outputs.any_changed == 'true'
|
||||
|
|
@ -27,6 +27,24 @@ jobs:
|
|||
yamllint "$file"
|
||||
done
|
||||
|
||||
ansible-lint:
|
||||
runs-on: infra-1
|
||||
container:
|
||||
image: quay.io/fedora/fedora:latest
|
||||
steps:
|
||||
- name: Install testing tools
|
||||
run: |
|
||||
dnf install -y ansible-lint
|
||||
|
||||
- name: Checkout code
|
||||
uses: https://code.forgejo.org/actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: https://code.forgejo.org/tj-actions/changed-files@v47
|
||||
|
||||
- name: Run ansible-lint
|
||||
if: steps.changed-files.outputs.any_changed == 'true'
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue