From 6c33d0dccc0678cba1ebfaf4953a49ee1b8bd938 Mon Sep 17 00:00:00 2001 From: Rob Anderson Date: Mon, 21 Sep 2026 18:30:02 +0000 Subject: [PATCH] upgrade to node24 and use issue forms --- .devcontainer/Dockerfile | 12 +++---- .devcontainer/devcontainer.json | 8 ++--- .../request_marketplace_action.md | 20 ----------- .../request_marketplace_action.yml | 36 +++++++++++++++++++ .github/workflows/approve-or-deny-request.yml | 27 +++++++------- .github/workflows/initialize-request.yml | 27 +++++++------- .github/workflows/pr.yml | 2 +- .github/workflows/test.yml | 2 +- README.md | 17 +++------ examples.md | 36 ++++--------------- 10 files changed, 80 insertions(+), 107 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/request_marketplace_action.md create mode 100644 .github/ISSUE_TEMPLATE/request_marketplace_action.yml diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 8b4c28c..6f724c2 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,11 +1,7 @@ -# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/javascript-node/.devcontainer/base.Dockerfile -# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster -ARG VARIANT=20-bullseye -FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} - -# [Optional] Uncomment this section to install additional OS packages. -RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends python pip +# See here for image contents: https://github.com/devcontainers/images/tree/main/src/javascript-node +# [Choice] Node.js version: 24, 24-bookworm, 24-bullseye +ARG VARIANT=24-bullseye +FROM mcr.microsoft.com/devcontainers/javascript-node:${VARIANT} # [Optional] Uncomment if you want to install an additional version of node using nvm # ARG EXTRA_NODE_VERSION=10 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c5d3b7e..c993bee 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,13 +1,13 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: -// https://github.com/microsoft/vscode-dev-containers/tree/v0.195.0/containers/javascript-node +// https://github.com/devcontainers/images/tree/main/src/javascript-node { "name": "Node.js", "build": { "dockerfile": "Dockerfile", - // Update 'VARIANT' to pick a Node version: 16, 14, 12. - // Append -bullseye or -buster to pin to an OS version. + // Update 'VARIANT' to pick a Node version: 24. + // Append -bookworm or -bullseye to pin to an OS version. // Use -bullseye variants on local arm64/Apple Silicon. - "args": { "VARIANT": "20-bullseye" } + "args": { "VARIANT": "24-bullseye" } }, // Set *default* container specific settings.json values on container create. diff --git a/.github/ISSUE_TEMPLATE/request_marketplace_action.md b/.github/ISSUE_TEMPLATE/request_marketplace_action.md deleted file mode 100644 index 8620129..0000000 --- a/.github/ISSUE_TEMPLATE/request_marketplace_action.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: 'Request Marketplace Action' -about: Request an action from the marketplace on GitHub.com -title: 'Request: [MARKETPLACE_ACTION]' -assignees: 'actions-approvers' ---- - - -```json request -{ - "owner": "actions", - "repo": "toolkit", - "version": "latest" -} -``` - diff --git a/.github/ISSUE_TEMPLATE/request_marketplace_action.yml b/.github/ISSUE_TEMPLATE/request_marketplace_action.yml new file mode 100644 index 0000000..776cb6e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/request_marketplace_action.yml @@ -0,0 +1,36 @@ +name: Request Marketplace Action +description: Request an action from the marketplace on GitHub.com +title: "Request: " +assignees: + - actions-approvers +body: + - type: markdown + attributes: + value: | + Provide the repository details for the marketplace action you want to request. + You can find the owner and repository name in the action's GitHub URL: + `https://github.com/OWNER/REPOSITORY`. + - type: input + id: owner + attributes: + label: Owner + description: The GitHub organization or user that owns the action repository. + placeholder: actions + validations: + required: true + - type: input + id: repo + attributes: + label: Repository + description: The name of the action repository. + placeholder: toolkit + validations: + required: true + - type: input + id: version + attributes: + label: Version + description: Enter an exact release tag, or use "latest" to request the latest release. + placeholder: latest + validations: + required: true diff --git a/.github/workflows/approve-or-deny-request.yml b/.github/workflows/approve-or-deny-request.yml index 7648e3e..b11e5ba 100644 --- a/.github/workflows/approve-or-deny-request.yml +++ b/.github/workflows/approve-or-deny-request.yml @@ -12,24 +12,21 @@ jobs: parse-issue: runs-on: self-hosted outputs: - payload: ${{ steps.issue_body_parser_request.outputs.payload }} + payload: ${{ steps.issue_parser.outputs.json }} steps: - - name: Get JSON Data out of Issue Request - uses: peter-murray/issue-body-parser-action@6f0770bae810c272cbdccf6f817b0759a9d82647 # v3 - id: issue_body_parser_request - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - issue_id: ${{ github.event.issue.number }} - payload_marker: request - fail_on_missing: false - - name: Check out request validator - if: steps.issue_body_parser_request.outputs.payload != 'NOT_FOUND' + - name: Check out request parser and validator uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Parse issue form + id: issue_parser + uses: issue-ops/parser@cb7e2e4e5da701aad0e23e718bc4c91d442ca8ba # v5.0.0 + with: + body: ${{ github.event.issue.body }} + issue-form-template: request_marketplace_action.yml - name: Validate requested repository - if: steps.issue_body_parser_request.outputs.payload != 'NOT_FOUND' + if: steps.issue_parser.outputs.parsed_owner != '' && steps.issue_parser.outputs.parsed_repo != '' && steps.issue_parser.outputs.parsed_version != '' uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - REQUEST_PAYLOAD: ${{ steps.issue_body_parser_request.outputs.payload }} + REQUEST_PAYLOAD: ${{ steps.issue_parser.outputs.json }} with: script: | const { default: validateRequest } = await import('${{ github.workspace }}/.github/scripts/validate-request.mjs'); @@ -37,7 +34,7 @@ jobs: approve-or-deny-request: runs-on: self-hosted needs: parse-issue - if: needs.parse-issue.outputs.payload != 'NOT_FOUND' + if: fromJson(needs.parse-issue.outputs.payload).owner != '' && fromJson(needs.parse-issue.outputs.payload).repo != '' && fromJson(needs.parse-issue.outputs.payload).version != '' steps: - name: Lookup the latest release of ${{ fromJson(needs.parse-issue.outputs.payload).owner }}/${{ fromJson(needs.parse-issue.outputs.payload).repo }} id: get_version @@ -59,7 +56,7 @@ jobs: - name: Setup Node uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: - node-version: '20' + node-version: '24' check-latest: true - name: Install dependencies run: | diff --git a/.github/workflows/initialize-request.yml b/.github/workflows/initialize-request.yml index 856598c..fbec208 100644 --- a/.github/workflows/initialize-request.yml +++ b/.github/workflows/initialize-request.yml @@ -12,24 +12,21 @@ jobs: parse-issue: runs-on: self-hosted outputs: - payload: ${{ steps.issue_body_parser_request.outputs.payload }} + payload: ${{ steps.issue_parser.outputs.json }} steps: - - name: Get JSON Data out of Issue Request - uses: peter-murray/issue-body-parser-action@6f0770bae810c272cbdccf6f817b0759a9d82647 # v3 - id: issue_body_parser_request - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - issue_id: ${{ github.event.issue.number }} - payload_marker: request - fail_on_missing: false - - name: Check out request validator - if: steps.issue_body_parser_request.outputs.payload != 'NOT_FOUND' + - name: Check out request parser and validator uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Parse issue form + id: issue_parser + uses: issue-ops/parser@cb7e2e4e5da701aad0e23e718bc4c91d442ca8ba # v5.0.0 + with: + body: ${{ github.event.issue.body }} + issue-form-template: request_marketplace_action.yml - name: Validate requested repository - if: steps.issue_body_parser_request.outputs.payload != 'NOT_FOUND' + if: steps.issue_parser.outputs.parsed_owner != '' && steps.issue_parser.outputs.parsed_repo != '' && steps.issue_parser.outputs.parsed_version != '' uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - REQUEST_PAYLOAD: ${{ steps.issue_body_parser_request.outputs.payload }} + REQUEST_PAYLOAD: ${{ steps.issue_parser.outputs.json }} with: script: | const { default: validateRequest } = await import('${{ github.workspace }}/.github/scripts/validate-request.mjs'); @@ -37,7 +34,7 @@ jobs: initialize-request: runs-on: self-hosted needs: parse-issue - if: needs.parse-issue.outputs.payload != 'NOT_FOUND' + if: fromJson(needs.parse-issue.outputs.payload).owner != '' && fromJson(needs.parse-issue.outputs.payload).repo != '' && fromJson(needs.parse-issue.outputs.payload).version != '' steps: - name: Lookup the latest release of ${{ fromJson(needs.parse-issue.outputs.payload).owner }}/${{ fromJson(needs.parse-issue.outputs.payload).repo }} id: get_version @@ -63,7 +60,7 @@ jobs: - name: Setup Node uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 with: - node-version: '20' + node-version: '24' check-latest: true - name: Install dependencies run: | diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 65f1c4a..dea4b74 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1 - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 #v7.0.0 with: - node-version: '20' + node-version: '24' check-latest: true cache: 'npm' cache-dependency-path: ${{ env.working-directory }}/package-lock.json diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e30941..cdad888 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1 - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 #v7.0.0 with: - node-version: '20' + node-version: '24' check-latest: true cache: 'npm' cache-dependency-path: ${{ env.working-directory }}/package-lock.json diff --git a/README.md b/README.md index 8ff5f14..afaf225 100644 --- a/README.md +++ b/README.md @@ -14,18 +14,9 @@ This project provides two actions workflows to help manage the process of reques ## Requesting a marketplace action -To request a marketplace action, open an issue in this repo. Include in your issue, the following markdown... - -``` - ```json request - { - "owner": "hashicorp-contrib", - "repo": "setup-packer", - "version": "latest" - } - ``` -``` -The example above refers to the repo `https://github.com/hashicorp-contrib/setup-packer`. The value of the `version` field needs to either match exactly a release in the repo, or be `latest`. The value of `latest` will cause the workflow to find the latest release available currently. +To request a marketplace action, open an issue and select the **Request Marketplace Action** issue form. Enter the action repository's owner, repository name, and version. For example, use `hashicorp-contrib` as the owner and `setup-packer` as the repository for `https://github.com/hashicorp-contrib/setup-packer`. + +The version needs to either exactly match a release tag in the repository or be `latest`. The value `latest` causes the workflow to use the latest available release. See [examples.md](examples.md) for more examples. ## Prerequisites @@ -45,7 +36,7 @@ See [examples.md](examples.md) for more examples. `ACTIONS_APPROVED_ORG`: actions-approved `ACTIONS_APPROVERS_TEAM`: actions-approvers 1. Configure the Enterprise Actions Policies to allow select actions. Allow specified actions as follows: - - peter-murray/issue-body-parser-action@v1 (required by these workflows) + - issue-ops/parser@v5 (required by these workflows) ## Installing these workflows into another repo diff --git a/examples.md b/examples.md index e1ef3dd..7dd2702 100644 --- a/examples.md +++ b/examples.md @@ -1,31 +1,7 @@ -# Example issue bodies +# Example issue form values -``` - ```json request - { - "owner": "hashicorp-contrib", - "repo": "setup-packer", - "version": "latest" - } - ``` -``` - -``` - ```json request - { - "owner": "hashicorp", - "repo": "setup-terraform", - "version": "latest" - } - ``` -``` - -``` - ```json request - { - "owner": "aws-actions", - "repo": "configure-aws-credentials", - "version": "latest" - } - ``` -``` \ No newline at end of file +| Owner | Repository | Version | +| --- | --- | --- | +| `hashicorp-contrib` | `setup-packer` | `latest` | +| `hashicorp` | `setup-terraform` | `latest` | +| `aws-actions` | `configure-aws-credentials` | `latest` | \ No newline at end of file