Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/request_marketplace_action.md

This file was deleted.

36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/request_marketplace_action.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 12 additions & 15 deletions .github/workflows/approve-or-deny-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,29 @@ jobs:
parse-issue:
runs-on: ubuntu-latest
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');
validateRequest(process.env.REQUEST_PAYLOAD);
approve-or-deny-request:
runs-on: ubuntu-latest
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
Expand All @@ -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: |
Expand Down
27 changes: 12 additions & 15 deletions .github/workflows/initialize-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,29 @@ jobs:
parse-issue:
runs-on: ubuntu-latest
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');
validateRequest(process.env.REQUEST_PAYLOAD);
initialize-request:
runs-on: ubuntu-latest
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
Expand All @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
36 changes: 6 additions & 30 deletions examples.md
Original file line number Diff line number Diff line change
@@ -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"
}
```
```
| Owner | Repository | Version |
| --- | --- | --- |
| `hashicorp-contrib` | `setup-packer` | `latest` |
| `hashicorp` | `setup-terraform` | `latest` |
| `aws-actions` | `configure-aws-credentials` | `latest` |
Loading