-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
! replace linting by separated docker and script with explicit versions
- Loading branch information
Showing
4 changed files
with
24 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,13 @@ | ||
name: ansible_lint | ||
name: ansible-lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
ansible_lint: | ||
runs-on: ubuntu-20.04 | ||
ansible-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: System information | ||
run: | | ||
uname -a | ||
lsb_release -a | ||
sudo docker --version | ||
- name: Prepare and run container | ||
run: | | ||
sudo ./testing/1_create.sh linter | ||
sudo ./testing/2_run.sh linter | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Lint ansible | ||
run: | | ||
sudo docker exec test-container /etc/ansible/roles/git-tools/testing/lint.sh | ||
- name: Cleanup | ||
run: | | ||
sudo ./testing/5_remove.sh | ||
sudo linting/lint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#! /bin/bash -e | ||
|
||
SCRIPT_DIR="$( cd "$(dirname "$0")" ; pwd -P )" | ||
cd ${SCRIPT_DIR} | ||
|
||
docker build --rm --tag=ansible-lint . | ||
|
||
docker run \ | ||
--rm \ | ||
-v ${SCRIPT_DIR}/../testing:/testing:ro \ | ||
ansible-lint \ | ||
ansible-lint --exclude /root/.cache \ | ||
/testing/playbook.yml |
This file was deleted.
Oops, something went wrong.