-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 959 Bytes
/
hcp-packer.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
name: hcp-packer
on:
push:
branches:
- "master"
- "develop/**"
- "releases/**"
- "features/**"
pull_request:
branches: ["master", "staging"]
workflow_dispatch:
jobs:
hcp-packer:
runs-on: ubuntu-latest
name: Run Packer
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup `packer`
uses: hashicorp/setup-packer@main
id: setup
with:
version: "latest"
- name: Run `packer init`
id: init
run: "packer init ."
- name: Run `packer validate`
id: validate
run: "packer validate ."
- name: Build Artifact
run: packer build -color=false -on-error=abort .
env:
HCP_CLIENT_ID: ${{ secrets.HCP_CLIENT_ID }}
HCP_CLIENT_SECRET: ${{ secrets.HCP_CLIENT_SECRET }}
HCP_PACKER_BUILD_FINGERPRINT: "run.id.${{ github.run_id }}.run.attempt.${{ github.run_attempt }}"