Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fde60e111 | ||
|
|
3ffe05f85c | ||
|
|
f57ea8787c | ||
|
|
00ba6edc66 | ||
|
|
21c1159e4d | ||
|
|
6423fe3683 | ||
|
|
39808af6a2 | ||
|
|
fe4ba3360a | ||
|
|
926b8abad2 | ||
|
|
d988c9aaad | ||
|
|
bf559f8544 | ||
|
|
cda91bf2b9 | ||
|
|
2ae58da528 |
@@ -44,6 +44,8 @@ jobs:
|
|||||||
- run: npm run build
|
- run: npm run build
|
||||||
- uses: ./ # Uses the action in the root directory
|
- uses: ./ # Uses the action in the root directory
|
||||||
id: test
|
id: test
|
||||||
|
env:
|
||||||
|
https_proxy: https://example.com
|
||||||
with:
|
with:
|
||||||
app-id: ${{ vars.TEST_APP_ID }}
|
app-id: ${{ vars.TEST_APP_ID }}
|
||||||
private-key: ${{ secrets.TEST_APP_PRIVATE_KEY }}
|
private-key: ${{ secrets.TEST_APP_PRIVATE_KEY }}
|
||||||
|
|||||||
Vendored
+81
-21412
File diff suppressed because one or more lines are too long
Vendored
+81
-21412
File diff suppressed because one or more lines are too long
+10
-33
@@ -1,41 +1,18 @@
|
|||||||
import core from "@actions/core";
|
import core from "@actions/core";
|
||||||
import { request } from "@octokit/request";
|
import { request } from "@octokit/request";
|
||||||
import { ProxyAgent, fetch as undiciFetch } from "undici";
|
|
||||||
|
|
||||||
const baseUrl = core.getInput("github-api-url").replace(/\/$/, "");
|
/* c8 ignore start -- env knob setup */
|
||||||
|
// Encourage Node to honor standard *_PROXY vars for core HTTP(S) agents.
|
||||||
// https://docs.github.com/actions/hosting-your-own-runners/managing-self-hosted-runners/using-a-proxy-server-with-self-hosted-runners
|
if (process.env.NODE_USE_ENV_PROXY == null) {
|
||||||
const proxyUrl =
|
process.env.NODE_USE_ENV_PROXY = "1";
|
||||||
process.env.https_proxy ||
|
}
|
||||||
process.env.HTTPS_PROXY ||
|
|
||||||
process.env.http_proxy ||
|
|
||||||
process.env.HTTP_PROXY;
|
|
||||||
|
|
||||||
/* c8 ignore start */
|
|
||||||
// Native support for proxies in Undici is under consideration: https://github.com/nodejs/undici/issues/1650
|
|
||||||
// Until then, we need to use a custom fetch function to add proxy support.
|
|
||||||
const proxyFetch = (url, options) => {
|
|
||||||
const urlHost = new URL(url).hostname;
|
|
||||||
const noProxy = (process.env.no_proxy || process.env.NO_PROXY || "").split(
|
|
||||||
",",
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!noProxy.includes(urlHost)) {
|
|
||||||
options = {
|
|
||||||
...options,
|
|
||||||
dispatcher: new ProxyAgent(String(proxyUrl)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return undiciFetch(url, options);
|
|
||||||
};
|
|
||||||
/* c8 ignore stop */
|
/* c8 ignore stop */
|
||||||
|
|
||||||
|
// Get the GitHub API URL from the action input and remove any trailing slash
|
||||||
|
const baseUrl = core.getInput("github-api-url").replace(/\/$/, "");
|
||||||
|
|
||||||
|
// Configure the default settings for GitHub API requests
|
||||||
export default request.defaults({
|
export default request.defaults({
|
||||||
headers: {
|
headers: { "user-agent": "actions/create-github-app-token" },
|
||||||
"user-agent": "actions/create-github-app-token",
|
|
||||||
},
|
|
||||||
baseUrl,
|
baseUrl,
|
||||||
/* c8 ignore next */
|
|
||||||
request: proxyUrl ? { fetch: proxyFetch } : {},
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
import core from "@actions/core";
|
import core from "@actions/core";
|
||||||
import { createAppAuth } from "@octokit/auth-app";
|
import { createAppAuth } from "@octokit/auth-app";
|
||||||
|
|
||||||
@@ -38,7 +37,7 @@ export default main(
|
|||||||
core,
|
core,
|
||||||
createAppAuth,
|
createAppAuth,
|
||||||
request,
|
request,
|
||||||
skipTokenRevoke,
|
skipTokenRevoke
|
||||||
).catch((error) => {
|
).catch((error) => {
|
||||||
/* c8 ignore next 3 */
|
/* c8 ignore next 3 */
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
Generated
+5
-4
@@ -1,19 +1,18 @@
|
|||||||
{
|
{
|
||||||
"name": "create-github-app-token",
|
"name": "create-github-app-token",
|
||||||
"version": "3.0.0-beta.1",
|
"version": "3.0.0-beta.2",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "create-github-app-token",
|
"name": "create-github-app-token",
|
||||||
"version": "3.0.0-beta.1",
|
"version": "3.0.0-beta.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
"@octokit/auth-app": "^7.2.1",
|
"@octokit/auth-app": "^7.2.1",
|
||||||
"@octokit/request": "^9.2.2",
|
"@octokit/request": "^9.2.2",
|
||||||
"p-retry": "^6.2.1",
|
"p-retry": "^6.2.1"
|
||||||
"undici": "^7.8.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@octokit/openapi": "^19.1.0",
|
"@octokit/openapi": "^19.1.0",
|
||||||
@@ -24,6 +23,7 @@
|
|||||||
"esbuild": "^0.25.8",
|
"esbuild": "^0.25.8",
|
||||||
"execa": "^9.6.0",
|
"execa": "^9.6.0",
|
||||||
"open-cli": "^8.0.0",
|
"open-cli": "^8.0.0",
|
||||||
|
"undici": "^7.13.0",
|
||||||
"yaml": "^2.8.1"
|
"yaml": "^2.8.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -3817,6 +3817,7 @@
|
|||||||
"version": "7.13.0",
|
"version": "7.13.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-7.13.0.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-7.13.0.tgz",
|
||||||
"integrity": "sha512-l+zSMssRqrzDcb3fjMkjjLGmuiiK2pMIcV++mJaAc9vhjSGpvM7h43QgP+OAMb1GImHmbPyG2tBXeuyG5iY4gA==",
|
"integrity": "sha512-l+zSMssRqrzDcb3fjMkjjLGmuiiK2pMIcV++mJaAc9vhjSGpvM7h43QgP+OAMb1GImHmbPyG2tBXeuyG5iY4gA==",
|
||||||
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.18.1"
|
"node": ">=20.18.1"
|
||||||
|
|||||||
+3
-4
@@ -2,7 +2,7 @@
|
|||||||
"name": "create-github-app-token",
|
"name": "create-github-app-token",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "3.0.0-beta.1",
|
"version": "3.0.0-beta.2",
|
||||||
"description": "GitHub Action for creating a GitHub App Installation Access Token",
|
"description": "GitHub Action for creating a GitHub App Installation Access Token",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=24.4.0"
|
"node": ">=24.4.0"
|
||||||
@@ -18,8 +18,7 @@
|
|||||||
"@actions/core": "^1.11.1",
|
"@actions/core": "^1.11.1",
|
||||||
"@octokit/auth-app": "^7.2.1",
|
"@octokit/auth-app": "^7.2.1",
|
||||||
"@octokit/request": "^9.2.2",
|
"@octokit/request": "^9.2.2",
|
||||||
"p-retry": "^6.2.1",
|
"p-retry": "^6.2.1"
|
||||||
"undici": "^7.8.0"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@octokit/openapi": "^19.1.0",
|
"@octokit/openapi": "^19.1.0",
|
||||||
@@ -30,6 +29,7 @@
|
|||||||
"esbuild": "^0.25.8",
|
"esbuild": "^0.25.8",
|
||||||
"execa": "^9.6.0",
|
"execa": "^9.6.0",
|
||||||
"open-cli": "^8.0.0",
|
"open-cli": "^8.0.0",
|
||||||
|
"undici": "^7.13.0",
|
||||||
"yaml": "^2.8.1"
|
"yaml": "^2.8.1"
|
||||||
},
|
},
|
||||||
"release": {
|
"release": {
|
||||||
@@ -46,7 +46,6 @@
|
|||||||
"@semantic-release/release-notes-generator",
|
"@semantic-release/release-notes-generator",
|
||||||
"@semantic-release/github",
|
"@semantic-release/github",
|
||||||
"@semantic-release/npm",
|
"@semantic-release/npm",
|
||||||
"semantic-release-plugin-github-breaking-version-tag",
|
|
||||||
[
|
[
|
||||||
"@semantic-release/git",
|
"@semantic-release/git",
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user