mirror of
https://github.com/hashicorp/setup-packer.git
synced 2026-04-01 09:02:34 +00:00
Compare commits
62 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c3d53c525d | ||
|
|
55fb36cb90 | ||
|
|
54678572a9 | ||
|
|
7e22a1322f | ||
|
|
c6a9771a1b | ||
|
|
16c34db85f | ||
|
|
338341a90b | ||
|
|
76e3039aa9 | ||
|
|
a6bcd269ca | ||
|
|
59271c2fb5 | ||
|
|
3dc15b75c5 | ||
|
|
c1c8ce44a4 | ||
|
|
92af4816c4 | ||
|
|
2ac4bc4a8a | ||
|
|
ed9b71a61f | ||
|
|
ca2c895e99 | ||
|
|
c28511e3b1 | ||
|
|
f691831197 | ||
|
|
e7e292641e | ||
|
|
c6b045a680 | ||
|
|
6e81645839 | ||
|
|
58719cd714 | ||
|
|
45f6418756 | ||
|
|
b6bcc4665e | ||
|
|
83f9f7c11b | ||
|
|
dd2fd6b755 | ||
|
|
1aa358be5c | ||
|
|
c37b5bae78 | ||
|
|
5093328a2a | ||
|
|
60dc5f39e2 | ||
|
|
d38faf1295 | ||
|
|
6669b85272 | ||
|
|
dabe112c5d | ||
|
|
ecc5516821 | ||
|
|
fb333f6658 | ||
|
|
35eb25af04 | ||
|
|
367b335854 | ||
|
|
d345de254e | ||
|
|
e7171338be | ||
|
|
18fbd16177 | ||
|
|
d5c2c40d11 | ||
|
|
c666f87d3e | ||
|
|
86de60ecdd | ||
|
|
ae6b3ed3be | ||
|
|
8c999b2ff7 | ||
|
|
39e578e79f | ||
|
|
da1fc3d139 | ||
|
|
85839311bf | ||
|
|
591a97b495 | ||
|
|
ca6f8f3f18 | ||
|
|
501495b3a3 | ||
|
|
4a58ae79e4 | ||
|
|
93da82af22 | ||
|
|
f3ef35b95e | ||
|
|
552c468107 | ||
|
|
5338887b31 | ||
|
|
74ff345c9a | ||
|
|
9cd0219a3b | ||
|
|
71e9f608bf | ||
|
|
ebc43821c4 | ||
|
|
b4a8c1ee67 | ||
|
|
5236a2b53a |
14
.copywrite.hcl
Normal file
14
.copywrite.hcl
Normal file
@@ -0,0 +1,14 @@
|
||||
# Copyright IBM Corp. 2020, 2026
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
schema_version = 1
|
||||
|
||||
project {
|
||||
license = "Apache-2.0"
|
||||
copyright_year = 2022
|
||||
|
||||
header_ignore = [
|
||||
"dist/*",
|
||||
"node_modules/",
|
||||
]
|
||||
}
|
||||
15
.github/dependabot.yml
vendored
Normal file
15
.github/dependabot.yml
vendored
Normal 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/*"
|
||||
53
.github/workflows/actions-self-test.yml
vendored
Normal file
53
.github/workflows/actions-self-test.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
---
|
||||
|
||||
name: "GitHub Action: Self-Test"
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
env:
|
||||
PRODUCT_VERSION: "1.10.0"
|
||||
|
||||
jobs:
|
||||
setup-packer:
|
||||
name: Test `setup-packer`
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||
|
||||
- name: Setup `packer` (using local GitHub Action)
|
||||
uses: "./"
|
||||
id: setup
|
||||
with:
|
||||
version: ${{ env.PRODUCT_VERSION }}
|
||||
|
||||
- name: Print `$PATH` for `packer`
|
||||
run: which packer
|
||||
|
||||
- name: Print `packer` version
|
||||
run: packer version
|
||||
|
||||
- name: Validate `packer` version is accurate
|
||||
run: "packer version | grep --silent 'Packer v${{ env.PRODUCT_VERSION }}'"
|
||||
|
||||
- name: Run `packer fmt`
|
||||
run: packer fmt -check "./test/hello-world.pkr.hcl"
|
||||
|
||||
- name: Setup `packer` with an invalid version (using local GitHub Action)
|
||||
uses: "./"
|
||||
id: invalid_version
|
||||
with:
|
||||
version: "invalid_version"
|
||||
continue-on-error: true
|
||||
|
||||
- name: Validate invalid version failed
|
||||
if: steps.invalid_version.outcome == 'success'
|
||||
run: echo "Installing an invalid version expected to fail but did not" && exit 1
|
||||
|
||||
- name: Setup `packer` with `latest` version (using local GitHub Action)
|
||||
uses: "./"
|
||||
id: latest_version
|
||||
|
||||
- name: Print `packer` version
|
||||
run: packer version
|
||||
88
.github/workflows/code-quality.yml
vendored
88
.github/workflows/code-quality.yml
vendored
@@ -1,88 +0,0 @@
|
||||
---
|
||||
|
||||
name: Code Quality
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
PARENT_ORG: operatehappy
|
||||
META_PATH: dotfiles-org
|
||||
SELF_PATH: repository
|
||||
PYTHON_VERSION: 3.8
|
||||
PYTHON_ARCH: x64
|
||||
PRECOMMIT_CACHE_PATH: ".cache/pre-commit"
|
||||
PRECOMMIT_VERSION: 1.18.3
|
||||
PRECOMMIT_CONFIG: ".pre-commit-config.yaml"
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
name: pre-commit
|
||||
|
||||
steps:
|
||||
- name: Checkout Meta Repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{ env.PARENT_ORG }}/${{ env.META_PATH }}
|
||||
ref: master
|
||||
path: ${{ env.META_PATH }}
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
path: ${{ env.SELF_PATH }}
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
architecture: ${{ env.PYTHON_ARCH }}
|
||||
|
||||
- name: Update and Restore pip Binaries Cache
|
||||
uses: actions/cache@v1
|
||||
id: cache-pip-binaries
|
||||
with:
|
||||
path: "${{ env.pythonLocation }}/bin"
|
||||
key: "pip-binaries-${{ env.PYTHON_VERSION }}-${{ env.PRECOMMIT_VERSION }}"
|
||||
|
||||
- name: Update and Restore pip Packages Cache
|
||||
uses: actions/cache@v1
|
||||
id: cache-pip-packages
|
||||
with:
|
||||
path: "${{ env.pythonLocation }}/lib/python${{ env.PYTHON_VERSION }}/site-packages"
|
||||
key: "pip-packages-${{ env.PYTHON_VERSION }}-${{ env.PRECOMMIT_VERSION }}"
|
||||
|
||||
- name: Update and Restore pre-commit Cache
|
||||
uses: actions/cache@v1
|
||||
id: cache-precommit-hooks
|
||||
with:
|
||||
path: "~/${{ env.PRECOMMIT_CACHE_PATH }}"
|
||||
key: ${{ hashFiles(format('{0}/{1}/{2}', github.workspace, env.META_PATH, env.PRECOMMIT_CONFIG )) }}
|
||||
|
||||
- name: Install `pre-commit` via `pip`
|
||||
run: |
|
||||
pip \
|
||||
install "pre-commit==${{ env.PRECOMMIT_VERSION }}"
|
||||
shell: sh
|
||||
if: steps.cache-pip-binaries.outputs.cache-hit != 'true' && steps.cache-pip-packages.outputs.cache-hit != 'true'
|
||||
|
||||
- name: Setup `pre-commit`
|
||||
run: |
|
||||
pre-commit \
|
||||
install \
|
||||
--config "${{ github.workspace }}${{ env.UPSTREAM_REP }}/${{ env.PRECOMMIT_CONFIG }}"
|
||||
shell: sh
|
||||
working-directory: "${{ github.workspace }}/${{ env.SELF_PATH }}"
|
||||
if: steps.cache-precommit.outputs.cache-hit != 'true'
|
||||
|
||||
- name: Run `pre-commit`
|
||||
run: |
|
||||
pre-commit \
|
||||
run \
|
||||
--config "${{ github.workspace }}/${{ env.META_PATH }}/${{ env.PRECOMMIT_CONFIG }}" \
|
||||
--all-files
|
||||
working-directory: "${{ github.workspace }}/${{ env.SELF_PATH }}"
|
||||
shell: sh
|
||||
25
.github/workflows/compliance.yml
vendored
Normal file
25
.github/workflows/compliance.yml
vendored
Normal 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
|
||||
18
.github/workflows/repository-management.yml
vendored
18
.github/workflows/repository-management.yml
vendored
@@ -1,18 +0,0 @@
|
||||
---
|
||||
|
||||
name: Repository Management
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
assign-pr-to-author:
|
||||
runs-on: ubuntu-latest
|
||||
name: assign-pr-to-author
|
||||
|
||||
steps:
|
||||
- name: Assign Pull Request to Author
|
||||
uses: technote-space/assign-author@v1
|
||||
if: github.event_name == 'pull_request' && github.event.action == 'opened'
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
28
.github/workflows/superlinter.yml
vendored
Normal file
28
.github/workflows/superlinter.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
|
||||
name: "Code Quality: Super-Linter"
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
superlinter:
|
||||
name: Super-Linter
|
||||
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
|
||||
|
||||
- name: Lint Code with Super-Linter
|
||||
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
|
||||
45
.github/workflows/typescript.yml
vendored
Normal file
45
.github/workflows/typescript.yml
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
---
|
||||
|
||||
name: "Code Quality: TypeScript"
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
nodejs:
|
||||
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:
|
||||
- 20.x
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
|
||||
- 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-script fmt \
|
||||
&& \
|
||||
npm run-script build
|
||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules/
|
||||
11
.prettierrc.json
Normal file
11
.prettierrc.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"arrowParens": "avoid",
|
||||
"bracketSpacing": false,
|
||||
"parser": "typescript",
|
||||
"printWidth": 80,
|
||||
"semi": true,
|
||||
"singleQuote": false,
|
||||
"tabWidth": 2,
|
||||
"trailingComma": "es5",
|
||||
"useTabs": false
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
# `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
1
CODEOWNERS
Normal file
@@ -0,0 +1 @@
|
||||
* @hashicorp/github-actions-maintainers
|
||||
@@ -1,5 +0,0 @@
|
||||
FROM hashicorp/packer:light@sha256:df7feeff930b04a42f2027dd0924392246f7b5a38f0c56531a2d14cd0d1e9408
|
||||
|
||||
COPY "entrypoint.sh" "/entrypoint.sh"
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
2
LICENSE
2
LICENSE
@@ -1,3 +1,5 @@
|
||||
Copyright IBM Corp. 2022, 2026
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
194
README.md
194
README.md
@@ -1,112 +1,144 @@
|
||||
# GitHub Action: Packer
|
||||
# GitHub Action: `setup-packer`
|
||||
|
||||
> GitHub Action for running Packer [commands](https://packer.io/docs/commands/index.html).
|
||||
The `hashicorp/setup-packer` Action sets up the [Packer](https://www.packer.io) CLI in your GitHub Actions workflow by adding the `packer` binary to `PATH`.
|
||||
|
||||
[](https://github.com/hashicorp/setup-packer/actions/workflows/actions-self-test.yml)
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [GitHub Action: Packer](#github-action-packer)
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [Usage](#usage)
|
||||
- [Inputs](#inputs)
|
||||
- [command](#command)
|
||||
- [arguments](#arguments)
|
||||
- [target](#target)
|
||||
- [Notes](#notes)
|
||||
- [Author Information](#author-information)
|
||||
- [License](#license)
|
||||
<!-- TOC -->
|
||||
* [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)
|
||||
* [Author Information](#author-information)
|
||||
* [License](#license)
|
||||
<!-- TOC -->
|
||||
|
||||
## Requirements
|
||||
|
||||
This GitHub Actions supports all commands that are available in the `packer` CLI.
|
||||
|
||||
The [`build`](https://developer.hashicorp.com/packer/docs/commands/build) command may require access to provider-specific credentials.
|
||||
|
||||
Other [environment variables](https://developer.hashicorp.com/packer/docs/commands#environment-variables) (such as `PACKER_LOG`) may be set as normal and will be picked up accordingly.
|
||||
|
||||
## Usage
|
||||
|
||||
Add the Action to your [GitHub Workflow](https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#creating-a-workflow-file) like so:
|
||||
Create a GitHub Actions Workflow file (e.g.: `.github/workflows/packer.yml`):
|
||||
|
||||
```yaml
|
||||
---
|
||||
|
||||
name: Packer
|
||||
name: packer
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
env:
|
||||
PRODUCT_VERSION: "1.10.0" # or: "latest"
|
||||
|
||||
jobs:
|
||||
packer:
|
||||
runs-on: ubuntu-latest
|
||||
name: packer
|
||||
|
||||
name: Run Packer
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# fix backwards incompatibilities in template
|
||||
- name: Fix Template
|
||||
uses: operatehappy/packer-github-action
|
||||
- name: Setup `packer`
|
||||
uses: hashicorp/setup-packer@main
|
||||
id: setup
|
||||
with:
|
||||
command: fix
|
||||
version: ${{ env.PRODUCT_VERSION }}
|
||||
|
||||
# validate templates
|
||||
- name: Validate Template
|
||||
uses: operatehappy/packer-github-action
|
||||
- name: Run `packer init`
|
||||
id: init
|
||||
run: "packer init ./image.pkr.hcl"
|
||||
|
||||
- name: Run `packer validate`
|
||||
id: validate
|
||||
run: "packer validate ./image.pkr.hcl"
|
||||
```
|
||||
|
||||
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.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.
|
||||
|
||||
Additionally, you may configure [outputs](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-defining-outputs-for-a-job) to consume return values from the Action's operations.
|
||||
|
||||
## Inputs
|
||||
|
||||
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.
|
||||
|
||||
- `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).
|
||||
|
||||
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
|
||||
|
||||
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:
|
||||
command: validate
|
||||
arguments: -syntax-only
|
||||
target: artifacts.pkr.json packer.json
|
||||
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"
|
||||
|
||||
# build artifact
|
||||
- name: Build Artifact
|
||||
uses: operatehappy/packer-github-action
|
||||
with:
|
||||
command: build
|
||||
arguments: "-color=false -on-error=abort"
|
||||
|
||||
# additional steps to process artifacts
|
||||
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 }}"
|
||||
```
|
||||
|
||||
### Inputs
|
||||
|
||||
| Name | Description | Required | Default |
|
||||
|-------------|-----------------------|----------|----------------------|
|
||||
| `command` | command to execute | yes | |
|
||||
| `arguments` | arguments for command | no | |
|
||||
| `target` | file(s) to target | yes | `artifacts.pkr.json` |
|
||||
|
||||
#### `command`
|
||||
|
||||
`command` supports the following subset of Packer [CLI commands](https://packer.io/docs/commands/index.html):
|
||||
|
||||
- [build](https://packer.io/docs/commands/build.html) to generate a set of artifacts from a template
|
||||
- [fix](https://packer.io/docs/commands/fix.html) to find and correct backwards incompatible stanzas in a template
|
||||
- [validate](https://packer.io/docs/commands/validate.html) to validate the syntax and configuration of a template
|
||||
|
||||
Other CLI commands (`console`, `inspect` and `version`) are _technically_ supported, but have limited utility in a GitHub Actions Workflow, due to their interactive nature.
|
||||
|
||||
#### `arguments`
|
||||
|
||||
`arguments` supports all options available for the respective `command`.
|
||||
|
||||
The arguments must be provided as a single string. Multiple arguments should be concatenated like so: "-color=false -on-error=abort"
|
||||
|
||||
#### `target`
|
||||
|
||||
`target` supports a string consisting of one or more file paths:
|
||||
|
||||
```yaml
|
||||
# single file
|
||||
target: artifacts.pkr.json
|
||||
|
||||
# multiple files, separated by whitespace
|
||||
target: artifacts.pkr.json packer.json
|
||||
```
|
||||
|
||||
The Action will iterate over each file and run each `command`, separately.
|
||||
|
||||
## Notes
|
||||
|
||||
- To enable debug logging, create a secret named `ACTIONS_STEP_DEBUG` with the value `true`. See [here](https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-debug-message) for more information.
|
||||
|
||||
## Author Information
|
||||
|
||||
This module is maintained by the contributors listed on [GitHub](https://github.com/operatehappy/packer-github-action/graphs/contributors).
|
||||
This GitHub Action is maintained by the contributors listed on [GitHub](https://github.com/hashicorp/setup-packer/graphs/contributors).
|
||||
|
||||
Development of this module was sponsored by [Operate Happy](https://github.com/operatehappy).
|
||||
The original code of this repository is based on work done by [Matthew Sanabria](https://github.com/sudomateo) as part of the [setup-packer](https://github.com/sudomateo/setup-packer) GitHub Action.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
36
action.yml
36
action.yml
@@ -1,28 +1,22 @@
|
||||
# Copyright IBM Corp. 2022, 2026
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
---
|
||||
|
||||
name: Packer GitHub Actions
|
||||
author: Kerim Satirli <kerim@operatehappy.com>
|
||||
description: Run Packer commands
|
||||
|
||||
name: "Setup HashiCorp Packer"
|
||||
author: "Kerim Satirli"
|
||||
description: "A GitHub Action to install a specific version of HashiCorp Packer and add it to PATH."
|
||||
inputs:
|
||||
command:
|
||||
description: command to execute
|
||||
version:
|
||||
description: "The Packer version to install and add to PATH."
|
||||
required: true
|
||||
arguments:
|
||||
description: arguments for command
|
||||
target:
|
||||
description: file(s) to target
|
||||
required: true
|
||||
default: artifacts.pkr.json
|
||||
|
||||
default: "latest"
|
||||
outputs:
|
||||
command:
|
||||
description: interpolated command (incl. arguments) that will be executed
|
||||
|
||||
version:
|
||||
description: "The Packer version that was installed and added to PATH."
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
|
||||
using: "node20"
|
||||
main: "dist/index.js"
|
||||
branding:
|
||||
color: blue
|
||||
icon: package
|
||||
icon: "package"
|
||||
color: "blue"
|
||||
|
||||
49651
dist/index.js
vendored
Normal file
49651
dist/index.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/index.js.map
vendored
Normal file
1
dist/index.js.map
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"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"}
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# fail if INPUT_COMMAND is not set
|
||||
if [ -z "${INPUT_COMMAND}" ]; then
|
||||
echo "Required variable \`command\` is missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# assemble operation
|
||||
if [ -z "${INPUT_ARGUMENTS}" ]; then
|
||||
OPERATION="packer ${INPUT_COMMAND}"
|
||||
else
|
||||
OPERATION="packer ${INPUT_COMMAND} ${INPUT_ARGUMENTS}"
|
||||
fi
|
||||
|
||||
echo "::debug:: Executing command: ${OPERATION}"
|
||||
|
||||
# cast INPUT_TARGET string to "array"
|
||||
# shellcheck disable=SC2206
|
||||
TARGETS=(${INPUT_TARGET})
|
||||
|
||||
# iterate over target(s)
|
||||
for TARGET in "${TARGETS[@]}"; do
|
||||
echo "::debug:: Processing target ${TARGET}"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
${OPERATION} "${TARGET}"
|
||||
done
|
||||
34
examples/hcp-packer.yml
Normal file
34
examples/hcp-packer.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
# Copyright IBM Corp. 2022, 2026
|
||||
# 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 }}
|
||||
29
examples/packer.yml
Normal file
29
examples/packer.yml
Normal file
@@ -0,0 +1,29 @@
|
||||
# Copyright IBM Corp. 2022, 2026
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
name: packer
|
||||
|
||||
on:
|
||||
- push
|
||||
|
||||
jobs:
|
||||
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: "1.10.0" # or 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"
|
||||
653
package-lock.json
generated
Normal file
653
package-lock.json
generated
Normal file
@@ -0,0 +1,653 @@
|
||||
{
|
||||
"name": "setup-packer",
|
||||
"version": "3.1.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "setup-packer",
|
||||
"version": "3.1.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@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": "^22.5.0",
|
||||
"@types/semver": "^7.5.8",
|
||||
"typescript": "^5.5.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/core": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-2.0.3.tgz",
|
||||
"integrity": "sha512-Od9Thc3T1mQJYddvVPM4QGiLUewdh+3txmDYHHxoNdkqysR1MbCT+rFOtNUxYAz+7+6RIsqipVahY2GJqGPyxA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/exec": "^2.0.0",
|
||||
"@actions/http-client": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/exec": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-2.0.0.tgz",
|
||||
"integrity": "sha512-k8ngrX2voJ/RIN6r9xB82NVqKpnMRtxDoiO+g3olkIUpQNqjArXrCQceduQZCQj3P3xm32pChRLqRrtXTlqhIw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/io": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/http-client": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz",
|
||||
"integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tunnel": "^0.0.6",
|
||||
"undici": "^6.23.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/io": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-2.0.0.tgz",
|
||||
"integrity": "sha512-Jv33IN09XLO+0HS79aaODsvIRyduiF7NY/F6LYeK5oeUmrsz7aFdRphQjFoESF4jS7lMauDOttKALcpapVDIAg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@actions/tool-cache": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@actions/tool-cache/-/tool-cache-2.0.2.tgz",
|
||||
"integrity": "sha512-fBhNNOWxuoLxztQebpOaWu6WeVmuwa77Z+DxIZ1B+OYvGkGQon6kTVg6Z32Cb13WCuw0szqonK+hh03mJV7Z6w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.11.1",
|
||||
"@actions/exec": "^1.0.0",
|
||||
"@actions/http-client": "^2.0.1",
|
||||
"@actions/io": "^1.1.1",
|
||||
"semver": "^6.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/tool-cache/node_modules/@actions/core": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz",
|
||||
"integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/http-client": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/tool-cache/node_modules/@actions/exec": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
|
||||
"integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/io": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/tool-cache/node_modules/@actions/http-client": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
|
||||
"integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tunnel": "^0.0.6",
|
||||
"undici": "^5.25.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@actions/tool-cache/node_modules/@actions/io": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
|
||||
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@actions/tool-cache/node_modules/semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
}
|
||||
},
|
||||
"node_modules/@hashicorp/github-actions-core": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "git+ssh://git@github.com/hashicorp/github-actions-core.git#107c072fc94c6440243f98f5b8f3c2709d41d871",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@actions/core": "^1.10.1",
|
||||
"@actions/io": "^1.1.3",
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"@hashicorp/js-releases": "^1.7.2",
|
||||
"semver": "^7.5.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@hashicorp/github-actions-core/node_modules/@actions/core": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz",
|
||||
"integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/http-client": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@hashicorp/github-actions-core/node_modules/@actions/exec": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
|
||||
"integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@actions/io": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@hashicorp/github-actions-core/node_modules/@actions/http-client": {
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz",
|
||||
"integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"tunnel": "^0.0.6",
|
||||
"undici": "^5.25.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@hashicorp/github-actions-core/node_modules/@actions/io": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
|
||||
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@hashicorp/js-releases": {
|
||||
"version": "1.7.5",
|
||||
"resolved": "https://registry.npmjs.org/@hashicorp/js-releases/-/js-releases-1.7.5.tgz",
|
||||
"integrity": "sha512-PpxlKOKHByLPkMIV46JUFplKVPBQgZEeXMQjz21zNAHWAeS4wK7XakAbAiSvDClxa625JHloXtK3VitS+GNKkQ==",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"axios": "^1.7.4",
|
||||
"https-proxy-agent": "^5.0.1",
|
||||
"openpgp": "^5.5.0",
|
||||
"semver": "^7.3.5",
|
||||
"yauzl": "^2.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "22.19.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.11.tgz",
|
||||
"integrity": "sha512-BH7YwL6rA93ReqeQS1c4bsPpcfOmJasG+Fkr6Y59q83f9M1WcBRHR2vM+P9eOisYRcN3ujQoiZY8uk5W+1WL8w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"undici-types": "~6.21.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/semver": {
|
||||
"version": "7.7.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz",
|
||||
"integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/agent-base": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
|
||||
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/asn1.js": {
|
||||
"version": "5.4.1",
|
||||
"resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
|
||||
"integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bn.js": "^4.0.0",
|
||||
"inherits": "^2.0.1",
|
||||
"minimalistic-assert": "^1.0.0",
|
||||
"safer-buffer": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/asynckit": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/axios": {
|
||||
"version": "1.13.5",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz",
|
||||
"integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"follow-redirects": "^1.15.11",
|
||||
"form-data": "^4.0.5",
|
||||
"proxy-from-env": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/bn.js": {
|
||||
"version": "4.12.3",
|
||||
"resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.3.tgz",
|
||||
"integrity": "sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/buffer-crc32": {
|
||||
"version": "0.2.13",
|
||||
"resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
|
||||
"integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/call-bind-apply-helpers": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
|
||||
"integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
|
||||
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"delayed-stream": "~1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.4.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",
|
||||
"integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"ms": "^2.1.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"supports-color": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/delayed-stream": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/dunder-proto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"gopd": "^1.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-define-property": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
|
||||
"integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-errors": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
||||
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-object-atoms": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
|
||||
"integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-set-tostringtag": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
|
||||
"integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"es-errors": "^1.3.0",
|
||||
"get-intrinsic": "^1.2.6",
|
||||
"has-tostringtag": "^1.0.2",
|
||||
"hasown": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/fd-slicer": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
|
||||
"integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"pend": "~1.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.11",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz",
|
||||
"integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/RubenVerborgh"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"debug": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/form-data": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz",
|
||||
"integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"asynckit": "^0.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"es-set-tostringtag": "^2.1.0",
|
||||
"hasown": "^2.0.2",
|
||||
"mime-types": "^2.1.12"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/get-intrinsic": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
|
||||
"integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"call-bind-apply-helpers": "^1.0.2",
|
||||
"es-define-property": "^1.0.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.1.1",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-proto": "^1.0.1",
|
||||
"gopd": "^1.2.0",
|
||||
"has-symbols": "^1.1.0",
|
||||
"hasown": "^2.0.2",
|
||||
"math-intrinsics": "^1.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/get-proto": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
|
||||
"integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"dunder-proto": "^1.0.1",
|
||||
"es-object-atoms": "^1.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/gopd": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
|
||||
"integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-symbols": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
|
||||
"integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/has-tostringtag": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
|
||||
"integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"has-symbols": "^1.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/hasown": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
||||
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/math-intrinsics": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
|
||||
"integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-db": {
|
||||
"version": "1.52.0",
|
||||
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
|
||||
"integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mime-types": {
|
||||
"version": "2.1.35",
|
||||
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
|
||||
"integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mime-db": "1.52.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/minimalistic-assert": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
|
||||
"integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
||||
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/openpgp": {
|
||||
"version": "5.11.3",
|
||||
"resolved": "https://registry.npmjs.org/openpgp/-/openpgp-5.11.3.tgz",
|
||||
"integrity": "sha512-jXOPfIteBUQ2zSmRG4+Y6PNntIIDEAvoM/lOYCnvpXAByJEruzrHQZWE/0CGOKHbubwUuty2HoPHsqBzyKHOpA==",
|
||||
"deprecated": "This version is deprecated and will no longer receive security patches. Please refer to https://github.com/openpgpjs/openpgpjs/wiki/Updating-from-previous-versions for details on how to upgrade to a newer supported version.",
|
||||
"license": "LGPL-3.0+",
|
||||
"dependencies": {
|
||||
"asn1.js": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/pend": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
|
||||
"integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
||||
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.7.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz",
|
||||
"integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==",
|
||||
"license": "ISC",
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.9.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz",
|
||||
"integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undici": {
|
||||
"version": "6.24.0",
|
||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.24.0.tgz",
|
||||
"integrity": "sha512-lVLNosgqo5EkGqh5XUDhGfsMSoO8K0BAN0TyJLvwNRSl4xWGZlCVYsAIpa/OpA3TvmnM01GWcoKmc3ZWo5wKKA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=18.17"
|
||||
}
|
||||
},
|
||||
"node_modules/undici-types": {
|
||||
"version": "6.21.0",
|
||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz",
|
||||
"integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/yauzl": {
|
||||
"version": "2.10.0",
|
||||
"resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
|
||||
"integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"buffer-crc32": "~0.2.3",
|
||||
"fd-slicer": "~1.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
35
package.json
Normal file
35
package.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"name": "setup-packer",
|
||||
"version": "3.1.0",
|
||||
"description": "A GitHub Action to install a specific version of HashiCorp Packer and add it to PATH.",
|
||||
"keywords": [
|
||||
"github-actions",
|
||||
"hashicorp",
|
||||
"packer"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:hashicorp/setup-packer.git"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"author": "Kerim Satirli <kerim@hashicorp.com> & Jenna Goldstrich <jgoldstrich@hashicorp.com>",
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"build": "tsc && ncc build --no-cache",
|
||||
"fmt": "prettier --write 'src/*.ts'",
|
||||
"copywrite": "copywrite headers && copywrite license"
|
||||
},
|
||||
"dependencies": {
|
||||
"@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": "^22.5.0",
|
||||
"@types/semver": "^7.5.8",
|
||||
"typescript": "^5.5.4"
|
||||
},
|
||||
"overrides": {
|
||||
"undici": "6.24.0"
|
||||
}
|
||||
}
|
||||
26
src/index.ts
Normal file
26
src/index.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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) {
|
||||
core.setFailed("Required field 'version' not set");
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await hc.getHashicorpRelease(PRODUCT, version);
|
||||
} catch (error) {
|
||||
if (error instanceof Error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
42
test/hello-world.pkr.hcl
Normal file
42
test/hello-world.pkr.hcl
Normal file
@@ -0,0 +1,42 @@
|
||||
# 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" {
|
||||
content = "Lorem ipsum dolor sit amet"
|
||||
target = "sample_artifact"
|
||||
}
|
||||
|
||||
variable "bucket_name" {
|
||||
type = string
|
||||
default = "hello-world"
|
||||
}
|
||||
|
||||
build {
|
||||
hcp_packer_registry {
|
||||
bucket_name = "${var.bucket_name}"
|
||||
|
||||
description = <<EOT
|
||||
Some nice description about the image which artifact is being published to HCP Packer Registry. =D
|
||||
EOT
|
||||
|
||||
bucket_labels = {
|
||||
"version" = "1.2.3",
|
||||
"foo" = "bar",
|
||||
}
|
||||
}
|
||||
|
||||
sources = [
|
||||
"sources.file.basic_example"
|
||||
]
|
||||
}
|
||||
15
tsconfig.json
Normal file
15
tsconfig.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true,
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"outDir": "./dist",
|
||||
"pretty": true,
|
||||
"removeComments": true,
|
||||
"sourceMap": true,
|
||||
"strict": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user