Skip to content

Workflow file for this run

name: Packer Format and Validate
on:
pull_request:
branches:
- main
jobs:
packer_validate:
name: Packer Format and Validate
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Zip app
run: |
zip -r application.zip ./*
- name: Print current working directory
run: pwd
- name: List files in the root directory
run: |
ls -al
ls /
ls /tmp
- name: Set up Packer
uses: hashicorp/setup-packer@main
with:
packer-version: 'latest'
- name: format & validate
run: |
packer init webapp-packer.pkr.hcl
packer fmt -check webapp-packer.pkr.hcl
packer validate webapp-packer.pkr.hcl
env:
PKR_VAR_project_id: ${{ secrets.GCP_PROJECT_ID }}