Bumps the production-dependencies group with 2 updates: [@octokit/auth-app](https://github.com/octokit/auth-app.js) and [undici](https://github.com/nodejs/undici). Updates `@octokit/auth-app` from 7.0.0 to 7.1.0 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/octokit/auth-app.js/releases"><code>@octokit/auth-app</code>'s releases</a>.</em></p> <blockquote> <h2>v7.1.0</h2> <h1><a href="https://github.com/octokit/auth-app.js/compare/v7.0.0...v7.1.0">7.1.0</a> (2024-05-09)</h1> <h3>Features</h3> <ul> <li><code>appId</code> argument can be set to Client ID string (<a href="https://redirect.github.com/octokit/auth-app.js/issues/606">#606</a>) (<a href="https://github.com/octokit/auth-app.js/commit/7dc08e59f559758d123918622b0549ae004f1764">7dc08e5</a>)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/octokit/auth-app.js/commit/7dc08e59f559758d123918622b0549ae004f1764"><code>7dc08e5</code></a> feat: <code>appId</code> argument can be set to Client ID string (<a href="https://redirect.github.com/octokit/auth-app.js/issues/606">#606</a>)</li> <li><a href="https://github.com/octokit/auth-app.js/commit/81ac6ecd51985906888c31b4f43c83402ffc03ef"><code>81ac6ec</code></a> chore(deps): update dependency esbuild to ^0.21.0 (<a href="https://redirect.github.com/octokit/auth-app.js/issues/605">#605</a>)</li> <li><a href="https://github.com/octokit/auth-app.js/commit/1314f7b48a6410cd28eacef0077d549a316459e9"><code>1314f7b</code></a> build(deps): lock file maintenance (<a href="https://redirect.github.com/octokit/auth-app.js/issues/604">#604</a>)</li> <li>See full diff in <a href="https://github.com/octokit/auth-app.js/compare/v7.0.0...v7.1.0">compare view</a></li> </ul> </details> <br /> Updates `undici` from 6.15.0 to 6.18.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.18.2</h2> <h2>What's Changed</h2> <ul> <li>don't use internal header state for cookies by <a href="https://github.com/KhafraDev"><code>@KhafraDev</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3295">nodejs/undici#3295</a></li> <li>build(deps-dev): bump borp from 0.13.0 to 0.14.0 by <a href="https://github.com/dependabot"><code>@dependabot</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3298">nodejs/undici#3298</a></li> <li>fix: retry on body support by <a href="https://github.com/metcoder95"><code>@metcoder95</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3294">nodejs/undici#3294</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/nodejs/undici/compare/v6.18.1...v6.18.2">https://github.com/nodejs/undici/compare/v6.18.1...v6.18.2</a></p> <h2>v6.18.1</h2> <h2>What's Changed</h2> <ul> <li>docs: Update references to dispatcher in docs by <a href="https://github.com/haikyuu"><code>@haikyuu</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3281">nodejs/undici#3281</a></li> <li>fix: compatibility for global headers by <a href="https://github.com/tsctx"><code>@tsctx</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3286">nodejs/undici#3286</a></li> <li>websocket: pre-calculated length by <a href="https://github.com/tsctx"><code>@tsctx</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3284">nodejs/undici#3284</a></li> <li>ci: fix autobahn workflow by <a href="https://github.com/Uzlopak"><code>@Uzlopak</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3291">nodejs/undici#3291</a></li> <li>revert: "websocket: pre-calculated length" by <a href="https://github.com/KhafraDev"><code>@KhafraDev</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3290">nodejs/undici#3290</a></li> <li>websocket: use FixedQueue instead of Set by <a href="https://github.com/tsctx"><code>@tsctx</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3283">nodejs/undici#3283</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/haikyuu"><code>@haikyuu</code></a> made their first contribution in <a href="https://redirect.github.com/nodejs/undici/pull/3281">nodejs/undici#3281</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/nodejs/undici/compare/v6.18.0...v6.18.1">https://github.com/nodejs/undici/compare/v6.18.0...v6.18.1</a></p> <h2>v6.18.0</h2> <h2>What's Changed</h2> <ul> <li>permessage-deflate decompression support in websocket by <a href="https://github.com/KhafraDev"><code>@KhafraDev</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3263">nodejs/undici#3263</a></li> <li>fix: Fix server closing in tests. by <a href="https://github.com/ShogunPanda"><code>@ShogunPanda</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3279">nodejs/undici#3279</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/nodejs/undici/compare/v6.17.0...v6.18.0">https://github.com/nodejs/undici/compare/v6.17.0...v6.18.0</a></p> <h2>v6.17.0</h2> <h2>What's Changed</h2> <ul> <li>fetch: fix captureStackTrace by <a href="https://github.com/Uzlopak"><code>@Uzlopak</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3227">nodejs/undici#3227</a></li> <li>fetch: fix wpt test request-upload.any.js by <a href="https://github.com/Uzlopak"><code>@Uzlopak</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3234">nodejs/undici#3234</a></li> <li>websocket: don't clone buffer by <a href="https://github.com/tsctx"><code>@tsctx</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3240">nodejs/undici#3240</a></li> <li>Remove unecessary async from writeBuffer by <a href="https://github.com/DarkGL"><code>@DarkGL</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3245">nodejs/undici#3245</a></li> <li>refactor websocket control frame handling by <a href="https://github.com/KhafraDev"><code>@KhafraDev</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3241">nodejs/undici#3241</a></li> <li>fix parsing continuation frames in websocket by <a href="https://github.com/KhafraDev"><code>@KhafraDev</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3247">nodejs/undici#3247</a></li> <li>ci: node nightly test should use node 23 by <a href="https://github.com/Uzlopak"><code>@Uzlopak</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3248">nodejs/undici#3248</a></li> <li>Add test to verify if the connection is correctly aborted on cancel by <a href="https://github.com/mcollina"><code>@mcollina</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3219">nodejs/undici#3219</a></li> <li>Autobahn suite by <a href="https://github.com/KhafraDev"><code>@KhafraDev</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3251">nodejs/undici#3251</a></li> <li>websocket: fix 6 autobahn tests by <a href="https://github.com/KhafraDev"><code>@KhafraDev</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3254">nodejs/undici#3254</a></li> <li>websocket: checkout correct commit in autobahn workflow by <a href="https://github.com/Uzlopak"><code>@Uzlopak</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3258">nodejs/undici#3258</a></li> <li>Cleanup websocket by <a href="https://github.com/KhafraDev"><code>@KhafraDev</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3257">nodejs/undici#3257</a></li> <li>websocket: autobahn workflow should fail on error by <a href="https://github.com/Uzlopak"><code>@Uzlopak</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3259">nodejs/undici#3259</a></li> <li>add bodymixin bytes by <a href="https://github.com/KhafraDev"><code>@KhafraDev</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3262">nodejs/undici#3262</a></li> <li>perf: avoid buffer cloning by <a href="https://github.com/tsctx"><code>@tsctx</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3264">nodejs/undici#3264</a></li> <li>feat: dump interceptor by <a href="https://github.com/metcoder95"><code>@metcoder95</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3118">nodejs/undici#3118</a></li> <li>use private properties in Headers by <a href="https://github.com/KhafraDev"><code>@KhafraDev</code></a> in <a href="https://redirect.github.com/nodejs/undici/pull/3269">nodejs/undici#3269</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/665f24738041757789fab95cce40cb0345cf2c0f"><code>665f247</code></a> Bumped v6.18.2 (<a href="https://redirect.github.com/nodejs/undici/issues/3301">#3301</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/5f11247b34510a3dc821da3c10d3cea0f39a7b13"><code>5f11247</code></a> fix: retry on body support (<a href="https://redirect.github.com/nodejs/undici/issues/3294">#3294</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/18af4b07c3602c09a432c07e0c305deed5fbb08c"><code>18af4b0</code></a> build(deps-dev): bump borp from 0.13.0 to 0.14.0 (<a href="https://redirect.github.com/nodejs/undici/issues/3298">#3298</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/a4879b4663f1cbe190bcd6e62879ab4f994a0409"><code>a4879b4</code></a> don't use internal header state for cookies (<a href="https://redirect.github.com/nodejs/undici/issues/3295">#3295</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/eed423a66960d61da56f6185d9b6624e32cd4ff9"><code>eed423a</code></a> Bumped v6.18.1 (<a href="https://redirect.github.com/nodejs/undici/issues/3293">#3293</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/eeae378333fe5e9ae34bd0c6be856356b548d983"><code>eeae378</code></a> websocket: use FixedQueue instead of Set (<a href="https://redirect.github.com/nodejs/undici/issues/3283">#3283</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/fcfa4db6809885b9272bcaf7aaf6f5a498592ad4"><code>fcfa4db</code></a> revert: "websocket: pre-calculated length" (<a href="https://redirect.github.com/nodejs/undici/issues/3290">#3290</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/0564b46e64e6dcec483e4512a5fd732f7eabec0d"><code>0564b46</code></a> ci: fix autobahn workflow (<a href="https://redirect.github.com/nodejs/undici/issues/3291">#3291</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/13523fd7fe66a4238f9ee79326b64cac4fc47d15"><code>13523fd</code></a> websocket: pre-calculated length (<a href="https://redirect.github.com/nodejs/undici/issues/3284">#3284</a>)</li> <li><a href="https://github.com/nodejs/undici/commit/064b08d35b9372259a07c84f4d0c37da55b130c2"><code>064b08d</code></a> fix: compatibility for global headers (<a href="https://redirect.github.com/nodejs/undici/issues/3286">#3286</a>)</li> <li>Additional commits viewable in <a href="https://github.com/nodejs/undici/compare/v6.15.0...v6.18.2">compare view</a></li> </ul> </details> <br /> 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. Escaped newlines (\\n) will be automatically replaced with actual newlines.
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.