-
Notifications
You must be signed in to change notification settings - Fork 628
34 lines (34 loc) · 1.03 KB
/
packer-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: "Packer checks"
on:
push:
branches:
- main
pull_request:
paths:
- "images/**"
- ".github/workflows/packer-build.yml"
- "module/runners/templates/**"
env:
AWS_REGION: eu-west-1
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
verify_packer:
name: Verify packer
runs-on: ubuntu-latest
container:
image: index.docker.io/hashicorp/packer@sha256:12c441b8a3994e7df9f0e2692d9298f14c387e70bcc06139420977dbf80a137b # 1.11.2
strategy:
matrix:
image: ["linux-al2023", "windows-core-2019", "windows-core-2022", "ubuntu-focal", "ubuntu-jammy", "ubuntu-jammy-arm64"]
defaults:
run:
working-directory: images/${{ matrix.image }}
steps:
- name: "Checkout"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: packer init
run: packer init .
- name: check packer formatting
run: packer fmt -recursive -check=true .
- name: packer validate
run: packer validate -evaluate-datasources .