Compare commits

..

34 Commits

Author SHA1 Message Date
Tanmay Jain
732389e1f5 Updates undici override to 6.24.1
Aligns dependency override with the latest undici patch release
to incorporate bug fixes and improvements from upstream.
2026-03-23 12:12:40 +05:30
Tanmay Jain
c3d53c525d SECVULN: Update undici (#165) 2026-03-20 18:26:15 +05:30
Karthik P
55fb36cb90 upgrading undici to 6.23.0 (#155) 2026-03-13 11:40:40 +05:30
dependabot[bot]
54678572a9 Bump axios from 1.13.2 to 1.13.5 in the npm_and_yarn group across 1 directory (#154)
* Bump axios in the npm_and_yarn group across 1 directory

Bumps the npm_and_yarn group with 1 update in the / directory: [axios](https://github.com/axios/axios).


Updates `axios` from 1.13.2 to 1.13.5
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.13.2...v1.13.5)

---
updated-dependencies:
- dependency-name: axios
  dependency-version: 1.13.5
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>

* copy write fixes

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: kp2099 <karthik200499@gmail.com>
2026-02-17 15:48:38 +05:30
oss-core-libraries-dashboard[bot]
7e22a1322f [COMPLIANCE] Update Copyright and License Headers (#153)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2026-01-08 10:43:05 +05:30
Tanmay Jain
c6a9771a1b Remove copyright holder from .copywrite.hcl (#152) 2026-01-07 11:51:38 +05:30
Tanmay Jain
16c34db85f Updates dependencies (#151) 2025-12-24 11:03:27 +05:30
oss-core-libraries-dashboard[bot]
338341a90b [COMPLIANCE] Update Copyright and License Headers (#150)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2025-12-22 15:37:20 +05:30
dependabot[bot]
76e3039aa9 Bump axios from 1.6.8 to 1.7.5 in the npm_and_yarn group (#124)
Bumps the npm_and_yarn group with 1 update: [axios](https://github.com/axios/axios).


Updates `axios` from 1.6.8 to 1.7.5
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.6.8...v1.7.5)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 17:45:48 -07:00
dependabot[bot]
a6bcd269ca Bump @types/node from 22.2.0 to 22.5.0 (#123)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.2.0 to 22.5.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-26 17:43:09 -07:00
dependabot[bot]
59271c2fb5 Bump @types/node from 22.0.0 to 22.2.0 (#121)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.0.0 to 22.2.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-13 09:51:55 +02:00
hashicorp-tsccr[bot]
3dc15b75c5 Result of tsccr-helper -log-level=info gha update . (#119)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-08-01 13:52:06 +02:00
dependabot[bot]
c1c8ce44a4 Bump @types/node from 20.14.11 to 22.0.0 (#116)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.11 to 22.0.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-30 10:05:49 +02:00
dependabot[bot]
92af4816c4 Bump typescript from 5.5.3 to 5.5.4 (#117)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.3 to 5.5.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.3...v5.5.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-30 09:55:47 +02:00
dependabot[bot]
2ac4bc4a8a Bump @types/node from 20.14.8 to 20.14.11 (#115)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.8 to 20.14.11.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-23 08:44:07 +02:00
dependabot[bot]
ed9b71a61f Bump typescript from 5.5.2 to 5.5.3 (#111)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.2 to 5.5.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.2...v5.5.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-16 17:14:17 +02:00
hashicorp-tsccr[bot]
ca2c895e99 Result of tsccr-helper -log-level=info gha update . (#110)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-07-01 09:51:35 +02:00
dependabot[bot]
c28511e3b1 Bump @types/node from 20.14.2 to 20.14.8 (#109)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.2 to 20.14.8.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 22:45:38 -04:00
dependabot[bot]
f691831197 Bump typescript from 5.4.5 to 5.5.2 (#108)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.5 to 5.5.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.5...v5.5.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-24 22:45:31 -04:00
dependabot[bot]
e7e292641e Bump @types/node from 20.14.0 to 20.14.2 (#105)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.14.0 to 20.14.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-11 09:58:40 +02:00
hashicorp-tsccr[bot]
c6b045a680 Result of tsccr-helper -log-level=info gha update . (#102)
Co-authored-by: hashicorp-tsccr[bot] <hashicorp-tsccr[bot]@users.noreply.github.com>
2024-06-10 13:20:08 +02:00
dependabot[bot]
6e81645839 Bump @types/node from 20.12.12 to 20.14.0 (#103)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.12 to 20.14.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 13:19:53 +02:00
dependabot[bot]
58719cd714 --- (#101)
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-21 10:44:48 +02:00
dependabot[bot]
45f6418756 Bump @types/node from 20.12.10 to 20.12.11 (#100) 2024-05-14 07:30:17 +02:00
Kerim Satirli
b6bcc4665e adds CODEOWNERS and pin actions 2024-05-10 14:53:00 +02:00
dependabot[bot]
83f9f7c11b Bump hashicorp/setup-copywrite from 1.1.2 to 1.1.3 (#99)
Bumps [hashicorp/setup-copywrite](https://github.com/hashicorp/setup-copywrite) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/hashicorp/setup-copywrite/releases)
- [Commits](867a1a2a06...32638da2d4)

---
updated-dependencies:
- dependency-name: hashicorp/setup-copywrite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-10 09:39:26 +02:00
dependabot[bot]
dd2fd6b755 Bump @types/node from 20.12.8 to 20.12.10 (#98)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.8 to 20.12.10.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-07 10:22:42 +02:00
Kerim Satirli
1aa358be5c fixes map 2024-05-04 10:19:02 +02:00
dependabot[bot]
c37b5bae78 Bump follow-redirects from 1.15.5 to 1.15.6 (#94)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-04 09:50:02 +02:00
dependabot[bot]
5093328a2a Bump @hashicorp/github-actions-core from 1.0.0 to v1.0.0 (#97)
Bumps [@hashicorp/github-actions-core](https://github.com/hashicorp/github-actions-core) from 1.0.0 to v1.0.0.
- [Release notes](https://github.com/hashicorp/github-actions-core/releases)
- [Commits](d6dafcd904...107c072fc9)

---
updated-dependencies:
- dependency-name: "@hashicorp/github-actions-core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-04 09:49:32 +02:00
Kerim Satirli
60dc5f39e2 Maintenance (#96)
* 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`
2024-05-04 09:46:49 +02:00
Jenna Goldstrich
d38faf1295 Use GHA Core 0.4.1 (#92) 2024-02-09 07:44:12 -08:00
Akhan Zhakiyanov
6669b85272 feat: update action runner to use NodeJS 20 (#90)
* feat: update action to use NodeJS 20

* fix: bump major version as recommended by github

* fix: revert package version
2024-02-07 15:58:20 -08:00
hashicorp-copywrite[bot]
dabe112c5d [COMPLIANCE] Add Copyright and License Headers (#79)
Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
2023-11-15 09:56:36 -08:00
20 changed files with 34576 additions and 9177 deletions

View File

@@ -1,7 +1,14 @@
# Copyright IBM Corp. 2020, 2026
# SPDX-License-Identifier: Apache-2.0
schema_version = 1
project {
header_ignore = [
"dist/index.js"
license = "Apache-2.0"
copyright_year = 2022
header_ignore = [
"dist/*",
"node_modules/",
]
}

15
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
# Dependabot only updates HashiCorp GHAs, external GHAs are managed by internal tooling (tsccr)
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-name: "hashicorp/*"

View File

@@ -1,10 +1,12 @@
---
name: "GitHub Action: Self-Test"
on:
push:
env:
PRODUCT_VERSION: "1.8.6"
PRODUCT_VERSION: "1.10.0"
jobs:
setup-packer:
@@ -12,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup `packer` (using local GitHub Action)
uses: "./"

25
.github/workflows/compliance.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
---
name: "HashiCorp: Compliance"
on:
push:
permissions:
contents: read
jobs:
copywrite:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3
- run: copywrite headers --plan
- run: copywrite license --plan

View File

@@ -1,4 +1,5 @@
---
name: "Code Quality: Super-Linter"
on:
@@ -10,17 +11,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: Lint Code with Super-Linter
uses: github/super-linter/slim@45fc0d88288beee4701c62761281edfee85655d7 # v5.0.0
uses: github/super-linter/slim@4e51915f4a812abf59fed160bb14595c0a38a9e7 # v6
env:
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: "main"
DISABLE_ERRORS: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVASCRIPT_DEFAULT_STYLE: "prettier"
VALIDATE_JSON: true
VALIDATE_MD: true

View File

@@ -1,4 +1,5 @@
---
name: "Code Quality: TypeScript"
on:
@@ -9,27 +10,36 @@ jobs:
name: Node.js
runs-on: ubuntu-latest
env:
PACKAGES: "@vercel/ncc prettier"
strategy:
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast
fail-fast: false
matrix:
node-version:
- 18.x
- 20.x
steps:
- name: Checkout Repository
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Set up Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install NPM Packages
run: npm ci
- name: Install global NPM packages
run: npm install --global ${PACKAGES}
- name: Install Action-specific NPM Packages
run: npm install-clean
- name: Build TypeScript code
run: npm run build
run: |
npm run-script fmt \
&& \
npm run-script build

2
.gitignore vendored
View File

@@ -1,3 +1 @@
# TODO: generate dist folder in CI
# dist/
node_modules/

View File

@@ -1,15 +0,0 @@
# `0.3.0` (UNRELEASED, 2022-08)
* Update Dockerfile to point to packer version `1.8.2`
* Change `target` default to `.` [#17](https://github.com/hashicorp/packer-github-actions/pull/17)
* Mark `target` as not required [#17](https://github.com/hashicorp/packer-github-actions/pull/17)
* Add support for working_directory [#11](https://github.com/operatehappy/packer-github-actions/pull/11)
## `0.2.0` (2020-03-25)
* Adds Packer action (#1) ([d80192d](https://github.com/ksatirli/packer-github-actions/commit/d80192d)), closes [#1](https://github.com/ksatirli/packer-github-actions/issues/1)
* adds GitHub Actions for `code-quality` and `repository-management` ([2a0399e](https://github.com/ksatirli/packer-github-actions/commit/2a0399e))
## `0.1.0` (2020-03-24)
* adds base files ([6f7428a](https://github.com/ksatirli/packer-github-actions/commit/6f7428a))

1
CODEOWNERS Normal file
View File

@@ -0,0 +1 @@
* @hashicorp/github-actions-maintainers

View File

@@ -1,4 +1,4 @@
Copyright (c) 2020 HashiCorp, Inc.
Copyright IBM Corp. 2022, 2026
Apache License
Version 2.0, January 2004

View File

@@ -7,13 +7,13 @@ The `hashicorp/setup-packer` Action sets up the [Packer](https://www.packer.io)
## Table of Contents
<!-- TOC -->
* [GitHub Action: `setup-packer`](#github-action--setup-packer)
* [GitHub Action: `setup-packer`](#github-action-setup-packer)
* [Table of Contents](#table-of-contents)
* [Requirements](#requirements)
* [Usage](#usage)
* [Inputs](#inputs)
* [Outputs](#outputs)
* [Integrating with HCP Packer](#Integrating-with-HCP-Packer)
* [Integrating with HCP Packer](#integrating-with-hcp-packer)
* [Author Information](#author-information)
* [License](#license)
<!-- TOC -->
@@ -28,7 +28,7 @@ Other [environment variables](https://developer.hashicorp.com/packer/docs/comman
## Usage
1.) Create a GitHub Actions Workflow file (e.g.: `.github/workflows/packer.yml`):
Create a GitHub Actions Workflow file (e.g.: `.github/workflows/packer.yml`):
```yaml
name: packer
@@ -37,7 +37,7 @@ on:
push:
env:
PRODUCT_VERSION: "1.8.6" # or: "latest"
PRODUCT_VERSION: "1.10.0" # or: "latest"
jobs:
packer:
@@ -45,7 +45,7 @@ jobs:
name: Run Packer
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup `packer`
uses: hashicorp/setup-packer@main
@@ -66,8 +66,8 @@ In the above example, the following definitions have been set.
- The event trigger has been set to `push`. For a complete list, see [Events that trigger workflows](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows).
- The origin of this GitHub Action has been set as `hashicorp/setup-packer@main`. For newer versions, see the [Releases](https://github.com/hashicorp/setup-packer/releases).
- The version of `packer` to set up has been set as `1.8.6`. For a complete list, see [releases.hashicorp.com](https://releases.hashicorp.com/packer/).
- The Packer manifest to interact with has been set as `./image.pkr.hcl`
- The version of `packer` to set up has been set as `1.10.0`. For a complete list, see [releases.hashicorp.com](https://releases.hashicorp.com/packer/).
- The Packer manifest to interact with has been set as `./image.pkr.hcl`.
These definitions may require updating to suit your deployment, such as specifying [self-hosted](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-self-hosted-runners) runners.
@@ -79,6 +79,9 @@ This section contains a list of all inputs that may be set for this Action.
- `version` - The version of `packer` to install. Defaults to `latest` if unset.
> [!NOTE]
> To retrieve the `latest` version, this GitHub Action polls the HashiCorp [Releases API](https://api.releases.hashicorp.com/v1/releases/packer) and finds the latest released version of Packer that isn't marked as a pre-release (`is_prerelease`).
## Outputs
This section contains a list of all outputs that can be consumed from this Action.
@@ -86,11 +89,14 @@ This section contains a list of all outputs that can be consumed from this Actio
- `version` - The version of `packer` that was installed.
## Integrating with HCP Packer
To integrate with HCP Packer, add your HCP Client ID and HCP Client secret as environment variables to the Packer build call.
We add an `HCP_PACKER_BUILD_FINGERPRINT` in this example that is based on the workflow run ID, that way it is always unique
We recommend storing these in [GitHub Actions Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) (as opposed to plain-text). See the [HCP Packer Getting Started tutorial](https://developer.hashicorp.com/packer/tutorials/hcp-get-started/hcp-push-image-metadata)
We recommend storing these in [GitHub Actions Secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) (as opposed to plain-text).
For more information on using HCP Packer, see the [Getting Started tutorial](https://developer.hashicorp.com/packer/tutorials/hcp-get-started/hcp-push-image-metadata).
```yaml
name: hcp-packer
@@ -104,15 +110,18 @@ jobs:
name: Run Packer
steps:
- name: Checkout
uses: actions/checkout@v3
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"

View File

@@ -1,4 +1,4 @@
# Copyright (c) HashiCorp, Inc.
# Copyright IBM Corp. 2022, 2026
# SPDX-License-Identifier: Apache-2.0
---
@@ -15,7 +15,7 @@ outputs:
version:
description: "The Packer version that was installed and added to PATH."
runs:
using: "node16"
using: "node20"
main: "dist/index.js"
branding:
icon: "package"

42659
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored
View File

@@ -1 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,oDAAsC;AACtC,mEAAqD;AAErD,SAAe,IAAI;;QACjB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACzC,IAAI,OAAO,IAAI,IAAI,EAAE;YACnB,IAAI,CAAC,SAAS,CAAC,kCAAkC,CAAC,CAAC;YACnD,OAAO;SACR;QACD,IAAI;YACF,MAAM,EAAE,CAAC,mBAAmB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;SACjD;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,KAAK,YAAY,KAAK,EAAE;gBAC1B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;aAC/B;SACF;IACH,CAAC;CAAA;AAED,IAAI,EAAE,CAAC"}
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,oDAAsC;AACtC,mEAAqD;AAExC,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,SAAe,IAAI;;QACjB,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACzC,IAAI,OAAO,IAAI,IAAI,EAAE,CAAC;YACpB,IAAI,CAAC,SAAS,CAAC,kCAAkC,CAAC,CAAC;YACnD,OAAO;QACT,CAAC;QACD,IAAI,CAAC;YACH,MAAM,EAAE,CAAC,mBAAmB,CAAC,eAAO,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;IACH,CAAC;CAAA;AAED,IAAI,EAAE,CAAC"}

View File

@@ -1,4 +1,4 @@
# Copyright (c) HashiCorp, Inc.
# Copyright IBM Corp. 2022, 2026
# SPDX-License-Identifier: Apache-2.0
name: hcp-packer
@@ -10,21 +10,24 @@ jobs:
name: Run Packer
steps:
- name: Checkout
uses: actions/checkout@v3
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
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 }}

View File

@@ -1,4 +1,4 @@
# Copyright (c) HashiCorp, Inc.
# Copyright IBM Corp. 2022, 2026
# SPDX-License-Identifier: Apache-2.0
name: packer
@@ -12,13 +12,13 @@ jobs:
name: Run Packer
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup `packer`
uses: hashicorp/setup-packer@main
id: setup
with:
version: "1.8.6" # or latest
version: "1.10.0" # or latest
- name: Run `packer init`
id: init

887
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "setup-packer",
"version": "2.1.0",
"version": "3.1.0",
"description": "A GitHub Action to install a specific version of HashiCorp Packer and add it to PATH.",
"keywords": [
"github-actions",
@@ -16,19 +16,20 @@
"main": "dist/index.js",
"scripts": {
"build": "tsc && ncc build --no-cache",
"fmt": "prettier --write 'src/*.ts'"
"fmt": "prettier --write 'src/*.ts'",
"copywrite": "copywrite headers && copywrite license"
},
"dependencies": {
"@actions/core": "1.10.1",
"@actions/io": "1.1.3",
"@actions/tool-cache": "2.0.1",
"@hashicorp/github-actions-core": "github:hashicorp/github-actions-core#v0.3.1",
"@vercel/ncc": "0.36.1"
"@actions/core": "^2.0.3",
"@actions/http-client": "^3.0.2",
"@hashicorp/github-actions-core": "github:hashicorp/github-actions-core#v1.0.0"
},
"devDependencies": {
"@types/node": "18.14.1",
"@types/semver": "7.5.4",
"prettier": "2.8.4",
"typescript": "4.9.5"
"@types/node": "^22.5.0",
"@types/semver": "^7.5.8",
"typescript": "^5.5.4"
},
"overrides": {
"undici": "6.24.1"
}
}

View File

@@ -1,11 +1,13 @@
/**
* Copyright (c) HashiCorp, Inc.
* Copyright IBM Corp. 2022, 2026
* SPDX-License-Identifier: Apache-2.0
*/
import * as core from "@actions/core";
import * as hc from "@hashicorp/github-actions-core";
export const PRODUCT = "packer";
async function main() {
const version = core.getInput("version");
if (version == null) {
@@ -13,7 +15,7 @@ async function main() {
return;
}
try {
await hc.getHashicorpRelease("packer", version);
await hc.getHashicorpRelease(PRODUCT, version);
} catch (error) {
if (error instanceof Error) {
core.setFailed(error.message);

View File

@@ -1,8 +1,18 @@
# Copyright (c) HashiCorp, Inc.
# Copyright IBM Corp. 2022, 2026
# SPDX-License-Identifier: Apache-2.0
packer {
required_plugins {
# see https://github.com/hashicorp/packer-plugin-hashicups/releases/tag/v1.0.2
hashicups = {
version = ">= 1.0.0"
source = "github.com/hashicorp/hashicups"
}
}
}
# file: builds.pkr.hcl
source "file" "basic-example" {
source "file" "basic_example" {
content = "Lorem ipsum dolor sit amet"
target = "sample_artifact"
}
@@ -20,12 +30,13 @@ build {
Some nice description about the image which artifact is being published to HCP Packer Registry. =D
EOT
labels = {
"foo-version" = "3.4.0",
"foo" = "bar",
bucket_labels = {
"version" = "1.2.3",
"foo" = "bar",
}
}
sources = ["sources.file.basic-example"]
sources = [
"sources.file.basic_example"
]
}