-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
packer-rocm/actions: introduce 'ansible-lint', 'headless'->'hidden' (#56
) * Introduce `ansible-lint` * Introduce 'build', 'prep', and 'always' tags * Rename the 'headless' var to 'hidden' * Prepare for HCL verification, note concerns * Drop unused constants
- Loading branch information
1 parent
b4cca3e
commit 0881b7c
Showing
5 changed files
with
97 additions
and
39 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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
name: Lint 'packer-rocm' | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'packer-rocm/**' | ||
pull_request: | ||
paths: | ||
- 'packer-rocm/**' | ||
|
||
jobs: | ||
ansible-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
with: | ||
submodules: true | ||
|
||
- name: Setup Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: "3.x" | ||
cache: 'pip' | ||
|
||
- name: Cache Ansible Collections | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.ansible/collections | ||
key: ansible-collections-${{ hashFiles('packer-rocm/requirements.yml') }} | ||
|
||
- name: Install Ansible and Collections | ||
run: | | ||
pip install --no-compile ansible-core ansible-lint | ||
ansible-galaxy collection install -r packer-rocm/requirements.yml | ||
- name: ansible-lint | ||
run: | | ||
ansible-lint --profile production --parseable --nocolor packer-rocm/ | ||
# Not yet validating HCL, challenge: | ||
# Many out-of-place references to 'packer-maas' until playbook-run; Packer is strict | ||
# | ||
# - name: Setup `packer` | ||
# uses: hashicorp/[email protected] | ||
# id: setup | ||
# with: | ||
# version: "latest" |
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
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