https://github.com/dawitnida/packer-actions-demo
Packer template collection
https://github.com/dawitnida/packer-actions-demo
git github github-action github-actions hashicorp packer packer-template packer-validate
Last synced: 23 days ago
JSON representation
Packer template collection
- Host: GitHub
- URL: https://github.com/dawitnida/packer-actions-demo
- Owner: dawitnida
- Created: 2019-04-04T08:53:04.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-27T22:06:29.000Z (over 4 years ago)
- Last Synced: 2024-10-06T01:21:53.635Z (7 months ago)
- Topics: git, github, github-action, github-actions, hashicorp, packer, packer-template, packer-validate
- Language: HCL
- Size: 54.7 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Packer GitHub Actions Tester
Packer sample template collections for [Packer GitHub Actions][packer-gh-actions] testing.### Usage
Variables
- `PACKER_ACTION_WORKING_DIR` : Working directory
- `TEMPLATE_FILE_NAME` : Packer template file
- `ACTION_COMMENT` : Enable/Disable PR comment from validate result```
workflow "packer validate docker-image-template" {
resolves = "packer-validate-docker-image-template"
on = "pull_request"
}action "filter-open-synced-pr" {
uses = "actions/bin/filter@master"
args = "action 'opened|synchronize'"
}action "packer-validate-docker-image-template" {
uses = "dawitnida/packer-github-actions/validate@master"
needs = "filter-open-synced-pr"
secrets = [
"GITHUB_TOKEN",
]
env = {
TEMPLATE_FILE_NAME = "*.json"
PACKER_ACTION_WORKING_DIR = "dockers"
}
}workflow "packer validate template-x with var-file" {
resolves = "packer-validate-template-x"
on = "pull_request"
}action "packer-validate-template-x" {
uses = "dawitnida/packer-github-actions/validate@master"
needs = "filter-open-synced-pr"
secrets = [
"GITHUB_TOKEN",
]
args = [
"-var-file=global-vars.json",
]
env = {
TEMPLATE_FILE_NAME = "packer-template-x.json"
}
}workflow "packer validate template-y without arg" {
resolves = "packer-validate-template-y"
on = "pull_request"
}action "packer-validate-template-y" {
uses = "dawitnida/packer-github-actions/validate@master"
needs = "filter-open-synced-pr"
secrets = [
"GITHUB_TOKEN",
]
env = {
TEMPLATE_FILE_NAME = "packer-template-y.json"
}
}
```## Author
[Dawit Nida](https://github.com/dawitnida)[packer-gh-actions]: