This action runs packer build.
Optional Packer template file to use for packer build. Default "packer-template.json"
.
Optional Var file to use for packer build. Default "packer-vars.json"
.
Optional Directory where the packer template and var file reside. Default "."
.
To configure the action simply add the following lines to your .github/workflows/packer-build.yml workflow file:
name: Run packer build on a template file
on:
push:
branches:
- 'master'
jobs:
packer_build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Packer build
uses: riznob/[email protected]
with:
templateFile: 'packer-template.json'
varFile: 'packer-vars.json'
workingDir: '.'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-west-2