Conversation
- Check formatting with `packer fmt -check -diff` - Support `recursive` input to also check subdirectories (default `true`) - Add the diff to the job summary on failure via github.step-summary
- Install required plugins with `packer init` and run `packer validate` - Export `github_token` as `PACKER_GITHUB_API_TOKEN` to avoid anonymous GitHub API rate limits when downloading plugins - Add init/validate output to the job summary on failure via github.step-summary
- Run `ansible-lint` from the project directory so `.ansible-lint` and `ansible.cfg` are discovered as usual - Optionally install Galaxy collections from `requirements_file` outside the checkout and expose them via `ANSIBLE_COLLECTIONS_PATH` - Rely on ansible-lint's built-in GitHub Actions annotations - Add findings to the job summary on failure via github.step-summary
- Detect changed Packer template directories under builds/** - Run packer fmt and packer init/validate per directory with continue-on-error so all checks run - Collect per-directory outcomes via github.matrix-report and publish an aggregated report to the job summary and a sticky PR comment - Add pr_comment_enabled input (default true) to toggle the PR comment - Write default tool versions to a throwaway global mise config pointed at by `MISE_GLOBAL_CONFIG_FILE`, so repository pins in `mise.toml` / `.tool-versions` win and a self-hosted runner's config is left alone - Export `AWS_DEFAULT_REGION` so Amazon builders validate without AWS config
- Install python via mise and `ansible-lint` via pip (version pinnable) - Lint the Ansible project directory with the ansible.ansible-lint action - Optionally install Galaxy collections from `requirements_file` - Write default tool versions to a throwaway global mise config pointed at by `MISE_GLOBAL_CONFIG_FILE`, so repository pins in `mise.toml` / `.tool-versions` win and a self-hosted runner's config is left alone
…-action interface - Run `packer fmt`, `packer init`, `packer validate`, `ansible-galaxy collection install`, and `ansible-lint` through `shell.run`, and expose `skipped`, `stdout`, `stderr`, and `exitcode` like the Terraform and GitHub Actions checks - Resolve the target in a dedicated step: strip the trailing slash, skip with a notice when the directory holds no Packer HCL, template, or YAML files, and print the tool version there so it stays out of `stdout` - Guard the failure summary steps with `always()`, since the implicit `success()` otherwise skips them after the check fails - Report `skipped` and drop disabled checks in the Packer integration report, as the Terraform integration workflows do
GitHub Actions Integration
✅ All 1 passed. |
Member
Author
|
Verified on ubuntu-latest (run 35453505149) with the actions from #1: |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Temporary PR to run the aligned
packer.fmt,packer.validate, andansible.ansible-lintactions from #1 on a real runner: passing, failing, and empty (skipped) targets for each, assertingstdout/exitcode/skipped. Will be closed after the run. Not meant to be merged.