packer-rocm/actions: introduce 'ansible-lint', 'headless'->'hidden', … #6
Workflow file for this run
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
--- | |
name: Lint 'packer-rocm' | |
on: | |
push: | |
paths: | |
- 'packer-rocm/**' | |
pull_request: | |
paths: | |
- 'packer-rocm/**' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
submodules: true | |
- 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 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/ | |
# if Ansible passes, set up Packer/test HCL. | |
# challenge: many strict references to 'packer-maas' that are out-of-place until playbook-run. | |
# - name: Setup `packer` | |
# uses: hashicorp/[email protected] | |
# id: setup | |
# with: | |
# version: "latest" |