Skip to content

Update github action. #6

Update github action.

Update github action. #6

Workflow file for this run

name: Pack Virtual Machine Images
on:
push:
branches:
- main
jobs:
workflow_changes:
with:
what_to_check: ./.github
uses: ./.github/workflows/checkForChanges.yml
packer_changes:
with:
what_to_check: ./packer
uses: ./.github/workflows/checkForChanges.yml
terraform_changes:
with:
what_to_check: ./terraform
uses: ./.github/workflows/checkForChanges.yml
packer_build:
if: needs.workflow_changes.outputs.has_changes == 'true' || needs.packer_changes.outputs.has_changes == 'true'
runs-on: ubuntu-latest
strategy:
matrix:
include:
- provisioners: ${{ inputs.provisioners }}
steps:
- uses: actions/checkout@v4
- name: Set up Packer
uses: hashicorp/setup-packer@v3
with:
version: 1.11.2
# Needed for ISO builder
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Run `packer init`
working-directory: ./packer
id: init
run: "packer init ./ubuntu.pkr.hcl"
- name: Run `packer validate`
working-directory: ./packer
id: validate
run: "packer validate ./ubuntu.pkr.hcl"
## TODO: Add matrixed provisioner build here
- name: Build Packer Image
working-directory: ./packer
run: packer build ./ubuntu.pkr.hcl
## TODO: Decide how to export artifact.