generated from hashicorp/packer-plugin-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1016 Bytes
/
validate.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
# This workflow triggers on pull requests and pushes to the main branch.
# It uses Packer at latest version to init, validate and build
# an example configuration in a folder.
# This action is compatible with Packer v1.7.0 or later.
name: validate
env:
PRODUCT_VERSION: "1.8.6"
on:
push:
paths:
- "go.mod"
- "go.sum"
- "**.go"
branches:
- main
pull_request:
paths:
- "go.mod"
- "go.sum"
- "**.go"
branches:
- main
jobs:
validate:
runs-on: ubuntu-latest
name: validate
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup `packer`
uses: hashicorp/setup-packer@main
id: setup
with:
version: ${{ env.PRODUCT_VERSION }}
- name: Run `packer init`
id: init
run: |
cd example
packer init .
- name: Run `packer validate`
id: validate
run: |
cd example
packer validate .