Update README.md #48
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |