-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (31 loc) · 909 Bytes
/
check.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
name: Check
on: [push]
jobs:
setup-hashicorp:
runs-on: ubuntu-latest
steps:
- name: Install Hashicorp Packer
run: |
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
sudo apt-get update
sudo apt-get install packer
validate:
runs-on: ubuntu-latest
needs: [setup-hashicorp]
strategy:
matrix:
os: [openbsd-7.0]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Validate Packer HCL
run: packer validate "${{ matrix.os }}"
env:
VAGRANT_CLOUD_TOKEN: ${{ secrets.VAGRANT_CLOUD_TOKEN }}
- name: Check Packer HCL formatting
run: |
packer fmt "${{ matrix.os }}"
git diff
git diff --compact-summary
git diff --quiet