Skip to content

Merge pull request #3 from marlapativ/feat/a1/packerbuild #1

Merge pull request #3 from marlapativ/feat/a1/packerbuild

Merge pull request #3 from marlapativ/feat/a1/packerbuild #1

Workflow file for this run

name: packer validate
on:
push:
branches:
- main
jobs:
validate:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- name: Checkout repository
id: checkout
uses: actions/checkout@v4
- name: Set up Packer
id: setup
uses: hashicorp/setup-packer@main
- name: Packer init
id: init
run: "packer init ."
- name: Packer fmt check
id: fmt
run: "packer fmt -check ."
- name: Packer validate
id: validate
run: "packer validate -syntax-only -evaluate-datasources ."
- name: Packer build
env:
# TODO: Is this alright?
PACKER_BUILD_ARGS: ${{ secrets.PACKER_BUILD_ARGS }}
id: build
run: packer build -color=false -var "${PACKER_BUILD_ARGS}" .