60dc5f39e2
* bumps `actions/checkout` to `v4` * bumps base Packer versions to `1.10` * docs update * package-lock maintenance * updates examples * updates deps * updates example Packer file with new key `bucket_labels` instead of `labels` * adds external plugin for testing * updates copywrite config * install `ncc` globally instead of via `devDeps`
35 lines
903 B
YAML
35 lines
903 B
YAML
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
name: hcp-packer
|
|
on:
|
|
- push
|
|
jobs:
|
|
hcp-packer:
|
|
runs-on: ubuntu-latest
|
|
name: Run Packer
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup `packer`
|
|
uses: hashicorp/setup-packer@main
|
|
id: setup
|
|
with:
|
|
version: "latest"
|
|
|
|
- name: Run `packer init`
|
|
id: init
|
|
run: "packer init ./image.pkr.hcl"
|
|
|
|
- name: Run `packer validate`
|
|
id: validate
|
|
run: "packer validate ./image.pkr.hcl"
|
|
|
|
- name: Build Artifact
|
|
run: "packer build -color=false -on-error=abort image.pkr.hcl"
|
|
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 }}
|