Bumps the production-dependencies group with 1 update: [undici](https://github.com/nodejs/undici). Updates `undici` from 6.6.2 to 6.10.2 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/nodejs/undici/releases">undici's releases</a>.</em></p> <blockquote> <h2>v6.10.2</h2> <h2>What's Changed</h2> <ul> <li>Do not fail test if streams support typed arrays by <a href="https://github.com/mcollina"><code>@mcollina</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2978">nodejs/undici#2978</a></li> <li>fix(fetch): properly redirect non-ascii location header url by <a href="https://github.com/Xvezda"><code>@Xvezda</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2971">nodejs/undici#2971</a></li> <li>perf: Remove double-stringify in setCookie by <a href="https://github.com/peterver"><code>@peterver</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2980">nodejs/undici#2980</a></li> <li>[fix <a href="https://redirect.github.com/nodejs/undici/issues/2982">#2982</a>] use DispatcherInterceptor type for Dispatcher#Compose by <a href="https://github.com/clovis-guillemot"><code>@clovis-guillemot</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2983">nodejs/undici#2983</a></li> <li>fix: make EventSource properties enumerable by <a href="https://github.com/MattBidewell"><code>@MattBidewell</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2987">nodejs/undici#2987</a></li> <li>docs: ✏️ fixed benchmark links by <a href="https://github.com/benhalverson"><code>@benhalverson</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2991">nodejs/undici#2991</a></li> <li>fix(<a href="https://redirect.github.com/nodejs/undici/issues/2986">#2986</a>): bad start check by <a href="https://github.com/metcoder95"><code>@metcoder95</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2992">nodejs/undici#2992</a></li> <li>fix(H2 Client): bind stream 'data' listener only after received 'response' event by <a href="https://github.com/St3ffGv4"><code>@St3ffGv4</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2985">nodejs/undici#2985</a></li> <li>feat: added search input by <a href="https://github.com/benhalverson"><code>@benhalverson</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2993">nodejs/undici#2993</a></li> <li>chore: validate responses can be consumed without a Content-Length or… by <a href="https://github.com/jacob-ebey"><code>@jacob-ebey</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2995">nodejs/undici#2995</a></li> <li>fix error message by <a href="https://github.com/KhafraDev"><code>@KhafraDev</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2998">nodejs/undici#2998</a></li> <li>Revert "perf: reuse TextDecoder instance (<a href="https://redirect.github.com/nodejs/undici/issues/2863">#2863</a>)" by <a href="https://github.com/panva"><code>@panva</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2999">nodejs/undici#2999</a></li> <li>test: remove only by <a href="https://github.com/metcoder95"><code>@metcoder95</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3001">nodejs/undici#3001</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/Xvezda"><code>@Xvezda</code></a> made their first contribution in <a href="https://redirect.github.com/nodejs/undici/pull/2971">nodejs/undici#2971</a></li> <li><a href="https://github.com/peterver"><code>@peterver</code></a> made their first contribution in <a href="https://redirect.github.com/nodejs/undici/pull/2980">nodejs/undici#2980</a></li> <li><a href="https://github.com/clovis-guillemot"><code>@clovis-guillemot</code></a> made their first contribution in <a href="https://redirect.github.com/nodejs/undici/pull/2983">nodejs/undici#2983</a></li> <li><a href="https://github.com/MattBidewell"><code>@MattBidewell</code></a> made their first contribution in <a href="https://redirect.github.com/nodejs/undici/pull/2987">nodejs/undici#2987</a></li> <li><a href="https://github.com/benhalverson"><code>@benhalverson</code></a> made their first contribution in <a href="https://redirect.github.com/nodejs/undici/pull/2991">nodejs/undici#2991</a></li> <li><a href="https://github.com/St3ffGv4"><code>@St3ffGv4</code></a> made their first contribution in <a href="https://redirect.github.com/nodejs/undici/pull/2985">nodejs/undici#2985</a></li> <li><a href="https://github.com/jacob-ebey"><code>@jacob-ebey</code></a> made their first contribution in <a href="https://redirect.github.com/nodejs/undici/pull/2995">nodejs/undici#2995</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/nodejs/undici/compare/v6.10.0...v6.10.2">https://github.com/nodejs/undici/compare/v6.10.0...v6.10.2</a></p> <h2>v6.10.1</h2> <p><strong>Full Changelog</strong>: <a href="https://github.com/nodejs/undici/compare/v6.10.0...v6.10.1">https://github.com/nodejs/undici/compare/v6.10.0...v6.10.1</a></p> <h2>v6.10.0</h2> <h2>What's Changed</h2> <ul> <li>test: fix flakyness of issue-803 test by <a href="https://github.com/Uzlopak"><code>@Uzlopak</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2960">nodejs/undici#2960</a></li> <li>Cleanup format by <a href="https://github.com/KhafraDev"><code>@KhafraDev</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2959">nodejs/undici#2959</a></li> <li>Chore: run tests daily against node nightly by <a href="https://github.com/mweberxyz"><code>@mweberxyz</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2969">nodejs/undici#2969</a></li> <li>fix: fix retry handler option by <a href="https://github.com/acommodari"><code>@acommodari</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2962">nodejs/undici#2962</a></li> <li>build(deps): bump node from <code>4999fa1</code> to <code>577f8eb</code> in /build by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2974">nodejs/undici#2974</a></li> <li>feat(TS): add types for composed dispatchers by <a href="https://github.com/metcoder95"><code>@metcoder95</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2967">nodejs/undici#2967</a></li> <li>fix: count for error response and network errors by <a href="https://github.com/metcoder95"><code>@metcoder95</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2966">nodejs/undici#2966</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/mweberxyz"><code>@mweberxyz</code></a> made their first contribution in <a href="https://redirect.github.com/nodejs/undici/pull/2969">nodejs/undici#2969</a></li> <li><a href="https://github.com/acommodari"><code>@acommodari</code></a> made their first contribution in <a href="https://redirect.github.com/nodejs/undici/pull/2962">nodejs/undici#2962</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/nodejs/undici/compare/v6.9.0...v6.10.0">https://github.com/nodejs/undici/compare/v6.9.0...v6.10.0</a></p> <h2>v6.9.0</h2> <h2>What's Changed</h2> <ul> <li>feat: add new dispatch compose by <a href="https://github.com/metcoder95"><code>@metcoder95</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2826">nodejs/undici#2826</a></li> <li>ci: add macos-latest to test-matrix by <a href="https://github.com/Uzlopak"><code>@Uzlopak</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/2952">nodejs/undici#2952</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/nodejs/undici/commit/7485cd9b4cf9a86cb76b1597df527eba15755bfc"><code>7485cd9</code></a> 6.10.2</li> <li><a href="https://github.com/nodejs/undici/commit/a79d6afe3702854cfdb43b0bf8426502629f701a"><code>a79d6af</code></a> test: remove only (<a href="https://redirect.github.com/nodejs/undici/issues/3001">#3001</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/0ac82a06caec6d2ffcf62852d4cc9077a1223ea9"><code>0ac82a0</code></a> Revert "perf: reuse TextDecoder instance (<a href="https://redirect.github.com/nodejs/undici/issues/2863">#2863</a>)" (<a href="https://redirect.github.com/nodejs/undici/issues/2999">#2999</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/bf8c671f52d5676fce18a62fc6c421a2740660f7"><code>bf8c671</code></a> fix error message (<a href="https://redirect.github.com/nodejs/undici/issues/2998">#2998</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/ef25209858817e697fd7607850413357c2b3b7e2"><code>ef25209</code></a> chore: validate responses can be consumed without a Content-Length or Transfe...</li> <li><a href="https://github.com/nodejs/undici/commit/f9cdf5658d35bf28c35cc2beab6912f6517f1d2b"><code>f9cdf56</code></a> feat: 🎸 added search input (<a href="https://redirect.github.com/nodejs/undici/issues/2993">#2993</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/c9acca97ce2300ea78cc84e2f45092e9abf446c4"><code>c9acca9</code></a> fix(H2 Client): bind stream 'data' listener only after received 'response' ev...</li> <li><a href="https://github.com/nodejs/undici/commit/0ec5a40daa6f28dd0936977da424a343805ab276"><code>0ec5a40</code></a> fix(<a href="https://redirect.github.com/nodejs/undici/issues/2986">#2986</a>): bad start check (<a href="https://redirect.github.com/nodejs/undici/issues/2992">#2992</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/83f36b73eedf60a9eadb0020db29a38f4e727980"><code>83f36b7</code></a> docs: ✏️ fixed benchmark links (<a href="https://redirect.github.com/nodejs/undici/issues/2991">#2991</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/bc304ff07e82b6e0a7c52eeb1b60fd79c8a001e9"><code>bc304ff</code></a> fix: make EventSource properties enumerable (<a href="https://redirect.github.com/nodejs/undici/issues/2987">#2987</a>)</li> <li>Additional commits viewable in <a href="https://github.com/nodejs/undici/compare/v6.6.2...v6.10.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Create GitHub App Token
GitHub Action for creating a GitHub App installation access token.
Usage
In order to use this action, you need to:
- Register new GitHub App
- Store the App's ID in your repository environment variables (example:
APP_ID) - Store the App's private key in your repository secrets (example:
PRIVATE_KEY)
Create a token for the current repository
name: Run tests on staging
on:
push:
branches:
- main
jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- uses: ./actions/staging-tests
with:
token: ${{ steps.app-token.outputs.token }}
Use app token with actions/checkout
on: [pull_request]
jobs:
auto-format:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
# required
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
ref: ${{ github.head_ref }}
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false
- uses: creyD/prettier_action@v4.3
with:
github_token: ${{ steps.app-token.outputs.token }}
Create a token for all repositories in the current owner's installation
on: [workflow_dispatch]
jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
- uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ steps.app-token.outputs.token }}
issue-number: ${{ github.event.issue.number }}
body: "Hello, World!"
Create a token for multiple repositories in the current owner's installation
on: [issues]
jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: "repo1,repo2"
- uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ steps.app-token.outputs.token }}
issue-number: ${{ github.event.issue.number }}
body: "Hello, World!"
Create a token for all repositories in another owner's installation
on: [issues]
jobs:
hello-world:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: another-owner
- uses: peter-evans/create-or-update-comment@v3
with:
token: ${{ steps.app-token.outputs.token }}
issue-number: ${{ github.event.issue.number }}
body: "Hello, World!"
Create tokens for multiple user or organization accounts
You can use a matrix strategy to create tokens for multiple user or organization accounts.
Note
See this documentation for information on using multiline strings in workflows.
on: [workflow_dispatch]
jobs:
set-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{steps.set.outputs.matrix }}
steps:
- id: set
run: echo 'matrix=[{"owner":"owner1"},{"owner":"owner2","repos":["repo1"]}]' >>"$GITHUB_OUTPUT"
use-matrix:
name: "@${{ matrix.owners-and-repos.owner }} installation"
needs: [set-matrix]
runs-on: ubuntu-latest
strategy:
matrix:
owners-and-repos: ${{ fromJson(needs.set-matrix.outputs.matrix) }}
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}
owner: ${{ matrix.owners-and-repos.owner }}
repositories: ${{ join(matrix.owners-and-repos.repos) }}
- uses: octokit/request-action@v2.x
id: get-installation-repositories
with:
route: GET /installation/repositories
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
- run: echo "$MULTILINE_JSON_STRING"
env:
MULTILINE_JSON_STRING: ${{ steps.get-installation-repositories.outputs.data }}
Run the workflow in a github.com repository against an organization in GitHub Enterprise Server
on: [push]
jobs:
create_issue:
runs-on: self-hosted
steps:
- name: Create GitHub App token
id: create_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ vars.GHES_APP_ID }}
private-key: ${{ secrets.GHES_APP_PRIVATE_KEY }}
owner: ${{ vars.GHES_INSTALLATION_ORG }}
github-api-url: ${{ vars.GITHUB_API_URL }}
- name: Create issue
uses: octokit/request-action@v2.x
with:
route: POST /repos/${{ github.repository }}/issues
title: "New issue from workflow"
body: "This is a new issue created from a GitHub Action workflow."
env:
GITHUB_TOKEN: ${{ steps.create_token.outputs.token }}
Inputs
app-id
Required: GitHub App ID.
private-key
Required: GitHub App private key.
owner
Optional: The owner of the GitHub App installation. If empty, defaults to the current repository owner.
repositories
Optional: Comma-separated list of repositories to grant access to.
Note
If
owneris set andrepositoriesis empty, access will be scoped to all repositories in the provided repository owner's installation. Ifownerandrepositoriesare empty, access will be scoped to only the current repository.
skip-token-revoke
Optional: If truthy, the token will not be revoked when the current job is complete.
github-api-url
Optional: The URL of the GitHub REST API. Defaults to the URL of the GitHub Rest API where the workflow is run from.
Outputs
token
GitHub App installation access token.
installation-id
GitHub App installation ID.
app-slug
GitHub App slug.
How it works
The action creates an installation access token using the POST /app/installations/{installation_id}/access_tokens endpoint. By default,
- The token is scoped to the current repository or
repositoriesif set. - The token inherits all the installation's permissions.
- The token is set as output
tokenwhich can be used in subsequent steps. - Unless the
skip-token-revokeinput is set to a truthy value, the token is revoked in thepoststep of the action, which means it cannot be passed to another job. - The token is masked, it cannot be logged accidentally.
Note
Installation permissions can differ from the app's permissions they belong to. Installation permissions are set when an app is installed on an account. When the app adds more permissions after the installation, an account administrator will have to approve the new permissions before they are set on the installation.