mirror of
https://github.com/actions/deploy-pages.git
synced 2026-03-28 17:04:53 +00:00
Compare commits
29 Commits
artifacts-
...
release/v2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
de14547edc | ||
|
|
ced2b1a16b | ||
|
|
3a91181e1b | ||
|
|
6fa14b662d | ||
|
|
f9e640bce0 | ||
|
|
3eefb79441 | ||
|
|
971e36e6ad | ||
|
|
6abbee335a | ||
|
|
e149aa9f91 | ||
|
|
0077311596 | ||
|
|
03b62d1911 | ||
|
|
ada3f9d061 | ||
|
|
82b8ae3f91 | ||
|
|
d183a290bd | ||
|
|
8c6ef3d8d5 | ||
|
|
5a0bbc6e7d | ||
|
|
49af2606ad | ||
|
|
8b1057e1ce | ||
|
|
1f9a7ee304 | ||
|
|
3aff9369e6 | ||
|
|
a3969a1774 | ||
|
|
d9c5ae4728 | ||
|
|
94490d3099 | ||
|
|
b2f7f34415 | ||
|
|
dc61a05a4c | ||
|
|
57dcea9665 | ||
|
|
11d1068b0c | ||
|
|
641f4888c4 | ||
|
|
377be98d59 |
4
.github/workflows/check-dist.yml
vendored
4
.github/workflows/check-dist.yml
vendored
@@ -22,10 +22,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.JS
|
- name: Setup Node.JS
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|||||||
4
.github/workflows/check-formatting.yml
vendored
4
.github/workflows/check-formatting.yml
vendored
@@ -19,10 +19,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.JS
|
- name: Setup Node.JS
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|||||||
4
.github/workflows/check-linter.yml
vendored
4
.github/workflows/check-linter.yml
vendored
@@ -19,10 +19,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.JS
|
- name: Setup Node.JS
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|||||||
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@@ -38,7 +38,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
|
|||||||
2
.github/workflows/draft-release.yml
vendored
2
.github/workflows/draft-release.yml
vendored
@@ -11,6 +11,6 @@ jobs:
|
|||||||
draft-release:
|
draft-release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: release-drafter/release-drafter@65c5fb495d1e69aa8c08a3317bc44ff8aabe9772 # v5.24.0
|
- uses: release-drafter/release-drafter@09c613e259eb8d4e7c81c2cb00618eb5fc4575a7 # v5.25.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
4
.github/workflows/rebuild-dependabot-prs.yml
vendored
4
.github/workflows/rebuild-dependabot-prs.yml
vendored
@@ -22,12 +22,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.PAGES_AUTOMATION_PAT }}
|
token: ${{ secrets.PAGES_AUTOMATION_PAT }}
|
||||||
|
|
||||||
- name: Setup Node.JS
|
- name: Setup Node.JS
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|||||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -14,10 +14,10 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.JS
|
- name: Setup Node.JS
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: '.node-version'
|
node-version-file: '.node-version'
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ This action is used to deploy [Actions artifacts][artifacts] to [GitHub Pages](h
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
See [action.yml](action.yml) for the various `inputs` this action supports (or [below](#inputs-📥)).
|
See [action.yml](action.yml) for the various `inputs` this action supports.
|
||||||
|
|
||||||
For examples that make use of this action, check out our [starter-workflows][starter-workflows] in a variety of frameworks.
|
For examples that make use of this action, check out our [starter-workflows][starter-workflows] in a variety of frameworks.
|
||||||
|
|
||||||
This action deploys a Pages site previously uploaded as an artifact (e.g. using [`actions/upload-pages-artifact`][upload-pages-artifact]).
|
This action expects an artifact named `github-pages` to have been created prior to execution. This is done automatically when using [`actions/upload-pages-artifact`][upload-pages-artifact].
|
||||||
|
|
||||||
We recommend this action to be used in a dedicated job:
|
We recommend this action to be used in a dedicated job:
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ jobs:
|
|||||||
|
|
||||||
There are a few important considerations to be aware of:
|
There are a few important considerations to be aware of:
|
||||||
|
|
||||||
1. The artifact being deployed must have been uploaded in a previous step, either in the same job or a separate job that doesn't execute until the upload is complete. See [`actions/upload-pages-artifact`][upload-pages-artifact] for more information about the format of the artifact we expect.
|
1. The artifact being deployed must have been uploaded in a previous step, either in the same job or a separate job that doesn't execute until the upload is complete.
|
||||||
|
|
||||||
2. The job that executes the deployment must at minimum have the following permissions:
|
2. The job that executes the deployment must at minimum have the following permissions:
|
||||||
- `pages: write`
|
- `pages: write`
|
||||||
|
|||||||
24113
dist/index.js
generated
vendored
24113
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
49
dist/licenses.txt
generated
vendored
49
dist/licenses.txt
generated
vendored
@@ -47,6 +47,28 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|||||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
@fastify/busboy
|
||||||
|
MIT
|
||||||
|
Copyright Brian White. All rights reserved.
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to
|
||||||
|
deal in the Software without restriction, including without limitation the
|
||||||
|
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||||
|
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||||
|
IN THE SOFTWARE.
|
||||||
|
|
||||||
@octokit/auth-token
|
@octokit/auth-token
|
||||||
MIT
|
MIT
|
||||||
The MIT License
|
The MIT License
|
||||||
@@ -453,6 +475,8 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|||||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
http-status-messages
|
||||||
|
|
||||||
is-plain-object
|
is-plain-object
|
||||||
MIT
|
MIT
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
@@ -551,6 +575,31 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
|
undici
|
||||||
|
MIT
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) Matteo Collina and Undici contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
universal-user-agent
|
universal-user-agent
|
||||||
ISC
|
ISC
|
||||||
# [ISC License](https://spdx.org/licenses/ISC)
|
# [ISC License](https://spdx.org/licenses/ISC)
|
||||||
|
|||||||
3906
package-lock.json
generated
3906
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
21
package.json
21
package.json
@@ -5,17 +5,20 @@
|
|||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/github": "^5.1.1"
|
"@actions/github": "^5.1.1",
|
||||||
|
"@actions/http-client": "^2.2.0",
|
||||||
|
"@octokit/request-error": "^5.0.1",
|
||||||
|
"http-status-messages": "^1.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vercel/ncc": "^0.36.1",
|
"@vercel/ncc": "^0.38.1",
|
||||||
"eslint": "^8.44.0",
|
"eslint": "^8.54.0",
|
||||||
"eslint-config-prettier": "^8.8.0",
|
"eslint-config-prettier": "^9.0.0",
|
||||||
"eslint-plugin-github": "^4.8.0",
|
"eslint-plugin-github": "^4.10.1",
|
||||||
"jest": "^29.6.1",
|
"jest": "^29.7.0",
|
||||||
"make-coverage-badge": "^1.2.0",
|
"nock": "^13.3.8",
|
||||||
"nock": "^13.3.1",
|
"prettier": "^3.1.0",
|
||||||
"prettier": "^3.0.0"
|
"make-coverage-badge": "^1.2.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"all": "npm run format && npm run lint && npm run prepare && npm run test && npm run coverage-badge",
|
"all": "npm run format && npm run lint && npm run prepare && npm run test && npm run coverage-badge",
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ const path = require('path')
|
|||||||
|
|
||||||
describe('with all environment variables set', () => {
|
describe('with all environment variables set', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
process.env.ACTIONS_RUNTIME_URL = 'http://my-url'
|
||||||
process.env.GITHUB_RUN_ID = '123'
|
process.env.GITHUB_RUN_ID = '123'
|
||||||
|
process.env.ACTIONS_RUNTIME_TOKEN = 'a-token'
|
||||||
process.env.GITHUB_REPOSITORY = 'actions/is-awesome'
|
process.env.GITHUB_REPOSITORY = 'actions/is-awesome'
|
||||||
process.env.GITHUB_TOKEN = 'gha-token'
|
process.env.GITHUB_TOKEN = 'gha-token'
|
||||||
process.env.GITHUB_SHA = '123abc'
|
process.env.GITHUB_SHA = '123abc'
|
||||||
@@ -24,7 +26,7 @@ describe('with all environment variables set', () => {
|
|||||||
|
|
||||||
describe('with variables missing', () => {
|
describe('with variables missing', () => {
|
||||||
it('execution fails if there are missing variables', done => {
|
it('execution fails if there are missing variables', done => {
|
||||||
delete process.env.GITHUB_RUN_ID
|
delete process.env.ACTIONS_RUNTIME_URL
|
||||||
const ip = path.join(__dirname, '../index.js')
|
const ip = path.join(__dirname, '../index.js')
|
||||||
cp.exec(`node ${ip}`, { env: process.env }, (err, stdout) => {
|
cp.exec(`node ${ip}`, { env: process.env }, (err, stdout) => {
|
||||||
expect(stdout).toBe('')
|
expect(stdout).toBe('')
|
||||||
|
|||||||
@@ -9,7 +9,9 @@ const fakeJwt =
|
|||||||
describe('Deployment', () => {
|
describe('Deployment', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.clearAllMocks()
|
jest.clearAllMocks()
|
||||||
|
process.env.ACTIONS_RUNTIME_URL = 'http://my-url/'
|
||||||
process.env.GITHUB_RUN_ID = '123'
|
process.env.GITHUB_RUN_ID = '123'
|
||||||
|
process.env.ACTIONS_RUNTIME_TOKEN = 'a-token'
|
||||||
process.env.GITHUB_REPOSITORY = 'actions/is-awesome'
|
process.env.GITHUB_REPOSITORY = 'actions/is-awesome'
|
||||||
process.env.GITHUB_TOKEN = 'gha-token'
|
process.env.GITHUB_TOKEN = 'gha-token'
|
||||||
process.env.GITHUB_SHA = '123abc'
|
process.env.GITHUB_SHA = '123abc'
|
||||||
@@ -51,18 +53,18 @@ describe('Deployment', () => {
|
|||||||
it('can successfully create a deployment', async () => {
|
it('can successfully create a deployment', async () => {
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
process.env.GITHUB_SHA = 'valid-build-version'
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
.reply(200, {
|
||||||
total_count: 1,
|
value: [
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
{ url: 'https://another-artifact.com', name: 'another-artifact' },
|
||||||
|
{ url: 'https://fake-artifact.com', name: 'github-pages' }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA,
|
pages_build_version: process.env.GITHUB_SHA,
|
||||||
oidc_token: fakeJwt
|
oidc_token: fakeJwt
|
||||||
})
|
})
|
||||||
@@ -82,25 +84,25 @@ describe('Deployment', () => {
|
|||||||
expect.stringMatching(new RegExp(`^Created deployment for ${process.env.GITHUB_SHA}`))
|
expect.stringMatching(new RegExp(`^Created deployment for ${process.env.GITHUB_SHA}`))
|
||||||
)
|
)
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('can successfully create a preview deployment', async () => {
|
it('can successfully create a preview deployment', async () => {
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
process.env.GITHUB_SHA = 'valid-build-version'
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
.reply(200, {
|
||||||
total_count: 1,
|
value: [
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
{ url: 'https://another-artifact.com', name: 'another-artifact' },
|
||||||
|
{ url: 'https://fake-artifact.com', name: 'github-pages' }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA,
|
pages_build_version: process.env.GITHUB_SHA,
|
||||||
oidc_token: fakeJwt,
|
oidc_token: fakeJwt,
|
||||||
preview: true
|
preview: true
|
||||||
@@ -125,44 +127,36 @@ describe('Deployment', () => {
|
|||||||
expect.stringMatching(new RegExp(`^Created deployment for ${process.env.GITHUB_SHA}`))
|
expect.stringMatching(new RegExp(`^Created deployment for ${process.env.GITHUB_SHA}`))
|
||||||
)
|
)
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('reports errors with failed artifact metadata exchange', async () => {
|
it('reports errors with failed artifact exchange', async () => {
|
||||||
process.env.GITHUB_SHA = 'invalid-build-version'
|
process.env.GITHUB_SHA = 'invalid-build-version'
|
||||||
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
.get(
|
.reply(400, {})
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(400, { message: 'Bad request' })
|
|
||||||
|
|
||||||
// Create the deployment
|
// Create the deployment
|
||||||
const deployment = new Deployment()
|
const deployment = new Deployment()
|
||||||
await expect(deployment.create()).rejects.toEqual(
|
await expect(deployment.create()).rejects.toEqual(
|
||||||
new Error(
|
new Error(
|
||||||
`Failed to create deployment (status: 400) with build version ${process.env.GITHUB_SHA}. Responded with: Bad request`
|
`Failed to create deployment (status: 400) with build version ${process.env.GITHUB_SHA}. Responded with: Bad Request`
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('reports errors with a failed 500 in a deployment', async () => {
|
it('reports errors with a failed 500 in a deployment', async () => {
|
||||||
process.env.GITHUB_SHA = 'build-version'
|
process.env.GITHUB_SHA = 'build-version'
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
.reply(200, { value: [{ url: 'https://invalid-artifact.com', name: 'github-pages' }] })
|
||||||
)
|
|
||||||
.reply(200, {
|
|
||||||
total_count: 1,
|
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
|
||||||
})
|
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://invalid-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA
|
pages_build_version: process.env.GITHUB_SHA
|
||||||
})
|
})
|
||||||
.reply(500, { message: 'oh no' })
|
.reply(500, { message: 'oh no' })
|
||||||
@@ -175,24 +169,19 @@ describe('Deployment', () => {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('reports errors with an unexpected 403 during deployment', async () => {
|
it('reports errors with an unexpected 403 during deployment', async () => {
|
||||||
process.env.GITHUB_SHA = 'build-version'
|
process.env.GITHUB_SHA = 'build-version'
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
.reply(200, { value: [{ url: 'https://invalid-artifact.com', name: 'github-pages' }] })
|
||||||
)
|
|
||||||
.reply(200, {
|
|
||||||
total_count: 1,
|
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
|
||||||
})
|
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://invalid-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA
|
pages_build_version: process.env.GITHUB_SHA
|
||||||
})
|
})
|
||||||
.reply(403, { message: 'You are forbidden' })
|
.reply(403, { message: 'You are forbidden' })
|
||||||
@@ -205,24 +194,19 @@ describe('Deployment', () => {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('reports errors with an unexpected 404 during deployment', async () => {
|
it('reports errors with an unexpected 404 during deployment', async () => {
|
||||||
process.env.GITHUB_SHA = 'build-version'
|
process.env.GITHUB_SHA = 'build-version'
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
.reply(200, { value: [{ url: 'https://invalid-artifact.com', name: 'github-pages' }] })
|
||||||
)
|
|
||||||
.reply(200, {
|
|
||||||
total_count: 1,
|
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
|
||||||
})
|
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://invalid-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA
|
pages_build_version: process.env.GITHUB_SHA
|
||||||
})
|
})
|
||||||
.reply(404, { message: 'Not found' })
|
.reply(404, { message: 'Not found' })
|
||||||
@@ -235,24 +219,19 @@ describe('Deployment', () => {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('reports errors with failed deployments', async () => {
|
it('reports errors with failed deployments', async () => {
|
||||||
process.env.GITHUB_SHA = 'invalid-build-version'
|
process.env.GITHUB_SHA = 'invalid-build-version'
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
.reply(200, { value: [{ url: 'https://invalid-artifact.com', name: 'github-pages' }] })
|
||||||
)
|
|
||||||
.reply(200, {
|
|
||||||
total_count: 1,
|
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
|
||||||
})
|
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://invalid-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA
|
pages_build_version: process.env.GITHUB_SHA
|
||||||
})
|
})
|
||||||
.reply(400, { message: 'Bad request' })
|
.reply(400, { message: 'Bad request' })
|
||||||
@@ -265,100 +244,26 @@ describe('Deployment', () => {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('fails if there are multiple artifacts with the same name', async () => {
|
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
|
||||||
.get(
|
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
|
||||||
total_count: 2,
|
|
||||||
artifacts: [
|
|
||||||
{
|
|
||||||
id: 13,
|
|
||||||
name: `github-pages`,
|
|
||||||
size_in_bytes: 1400
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 14,
|
|
||||||
name: `github-pages`,
|
|
||||||
size_in_bytes: 1620
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
|
|
||||||
const deployment = new Deployment()
|
|
||||||
await expect(deployment.create(fakeJwt)).rejects.toThrow(
|
|
||||||
`Multiple artifact unexpectedly found for workflow run ${process.env.GITHUB_RUN_ID}. Artifact count is 2.`
|
|
||||||
)
|
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('fails if there are no artifacts found', async () => {
|
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
|
||||||
.get(
|
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
|
||||||
total_count: 0,
|
|
||||||
artifacts: []
|
|
||||||
})
|
|
||||||
|
|
||||||
const deployment = new Deployment()
|
|
||||||
await expect(deployment.create(fakeJwt)).rejects.toThrow(
|
|
||||||
`No artifacts found for workflow run ${process.env.GITHUB_RUN_ID}. Ensure artifacts are uploaded with actions/artifact@v4 or later.`
|
|
||||||
)
|
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('fails with error message if list artifact endpoint returns 500', async () => {
|
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
|
||||||
.get(
|
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(500, { message: 'oh no' })
|
|
||||||
|
|
||||||
const deployment = new Deployment()
|
|
||||||
await expect(deployment.create(fakeJwt)).rejects.toThrow(
|
|
||||||
`Failed to create deployment (status: 500) with build version valid-build-version. Server error, is githubstatus.com reporting a Pages outage? Please re-run the deployment at a later time.`
|
|
||||||
)
|
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
|
||||||
})
|
|
||||||
|
|
||||||
it('warns if the artifact size is bigger than maximum', async () => {
|
it('warns if the artifact size is bigger than maximum', async () => {
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
process.env.GITHUB_SHA = 'valid-build-version'
|
||||||
const artifactSize = ONE_GIGABYTE + 1
|
const artifactSize = ONE_GIGABYTE + 1
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
.reply(200, {
|
||||||
total_count: 1,
|
value: [
|
||||||
artifacts: [
|
{ url: 'https://fake-artifact.com', name: 'github-pages', size: `${artifactSize}` },
|
||||||
{
|
{ url: 'https://another-artifact.com', name: 'another-artifact' }
|
||||||
id: 12,
|
|
||||||
name: `github-pages`,
|
|
||||||
size_in_bytes: `${artifactSize}`
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 12,
|
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA,
|
pages_build_version: process.env.GITHUB_SHA,
|
||||||
oidc_token: fakeJwt
|
oidc_token: fakeJwt
|
||||||
})
|
})
|
||||||
@@ -378,25 +283,25 @@ describe('Deployment', () => {
|
|||||||
expect.stringMatching(new RegExp(`^Created deployment for ${process.env.GITHUB_SHA}`))
|
expect.stringMatching(new RegExp(`^Created deployment for ${process.env.GITHUB_SHA}`))
|
||||||
)
|
)
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('warns when the timeout is greater than the maximum allowed', async () => {
|
it('warns when the timeout is greater than the maximum allowed', async () => {
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
process.env.GITHUB_SHA = 'valid-build-version'
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
.reply(200, {
|
||||||
total_count: 1,
|
value: [
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
{ url: 'https://another-artifact.com', name: 'another-artifact' },
|
||||||
|
{ url: 'https://fake-artifact.com', name: 'github-pages' }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA,
|
pages_build_version: process.env.GITHUB_SHA,
|
||||||
oidc_token: fakeJwt
|
oidc_token: fakeJwt
|
||||||
})
|
})
|
||||||
@@ -427,7 +332,7 @@ describe('Deployment', () => {
|
|||||||
`Warning: timeout value is greater than the allowed maximum - timeout set to the maximum of ${MAX_TIMEOUT} milliseconds.`
|
`Warning: timeout value is greater than the allowed maximum - timeout set to the maximum of ${MAX_TIMEOUT} milliseconds.`
|
||||||
)
|
)
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -436,18 +341,18 @@ describe('Deployment', () => {
|
|||||||
it('sets output to success when deployment is successful', async () => {
|
it('sets output to success when deployment is successful', async () => {
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
process.env.GITHUB_SHA = 'valid-build-version'
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
.reply(200, {
|
||||||
total_count: 1,
|
value: [
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
{ url: 'https://another-artifact.com', name: 'another-artifact' },
|
||||||
|
{ url: 'https://fake-artifact.com', name: 'github-pages' }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA,
|
pages_build_version: process.env.GITHUB_SHA,
|
||||||
oidc_token: fakeJwt
|
oidc_token: fakeJwt
|
||||||
})
|
})
|
||||||
@@ -472,7 +377,7 @@ describe('Deployment', () => {
|
|||||||
expect(core.setOutput).toBeCalledWith('status', 'succeed')
|
expect(core.setOutput).toBeCalledWith('status', 'succeed')
|
||||||
expect(core.info).toHaveBeenLastCalledWith('Reported success!')
|
expect(core.info).toHaveBeenLastCalledWith('Reported success!')
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
deploymentStatusScope.done()
|
deploymentStatusScope.done()
|
||||||
})
|
})
|
||||||
@@ -487,18 +392,18 @@ describe('Deployment', () => {
|
|||||||
it('exits early when deployment is not in progress', async () => {
|
it('exits early when deployment is not in progress', async () => {
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
process.env.GITHUB_SHA = 'valid-build-version'
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
.reply(200, {
|
||||||
total_count: 1,
|
value: [
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
{ url: 'https://another-artifact.com', name: 'another-artifact' },
|
||||||
|
{ url: 'https://fake-artifact.com', name: 'github-pages' }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA,
|
pages_build_version: process.env.GITHUB_SHA,
|
||||||
oidc_token: fakeJwt
|
oidc_token: fakeJwt
|
||||||
})
|
})
|
||||||
@@ -515,25 +420,25 @@ describe('Deployment', () => {
|
|||||||
await deployment.check()
|
await deployment.check()
|
||||||
expect(core.setFailed).toBeCalledWith('Unable to get deployment status.')
|
expect(core.setFailed).toBeCalledWith('Unable to get deployment status.')
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
})
|
})
|
||||||
|
|
||||||
it('enforces max timeout', async () => {
|
it('enforces max timeout', async () => {
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
process.env.GITHUB_SHA = 'valid-build-version'
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
.reply(200, {
|
||||||
total_count: 1,
|
value: [
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
{ url: 'https://another-artifact.com', name: 'another-artifact' },
|
||||||
|
{ url: 'https://fake-artifact.com', name: 'github-pages' }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA,
|
pages_build_version: process.env.GITHUB_SHA,
|
||||||
oidc_token: fakeJwt
|
oidc_token: fakeJwt
|
||||||
})
|
})
|
||||||
@@ -580,7 +485,7 @@ describe('Deployment', () => {
|
|||||||
expect(core.error).toBeCalledWith('Timeout reached, aborting!')
|
expect(core.error).toBeCalledWith('Timeout reached, aborting!')
|
||||||
expect(core.setFailed).toBeCalledWith('Timeout reached, aborting!')
|
expect(core.setFailed).toBeCalledWith('Timeout reached, aborting!')
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
cancelDeploymentScope.done()
|
cancelDeploymentScope.done()
|
||||||
})
|
})
|
||||||
@@ -588,18 +493,18 @@ describe('Deployment', () => {
|
|||||||
it('sets timeout to user timeout if user timeout is less than max timeout', async () => {
|
it('sets timeout to user timeout if user timeout is less than max timeout', async () => {
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
process.env.GITHUB_SHA = 'valid-build-version'
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
.reply(200, {
|
||||||
total_count: 1,
|
value: [
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
{ url: 'https://another-artifact.com', name: 'another-artifact' },
|
||||||
|
{ url: 'https://fake-artifact.com', name: 'github-pages' }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA,
|
pages_build_version: process.env.GITHUB_SHA,
|
||||||
oidc_token: fakeJwt
|
oidc_token: fakeJwt
|
||||||
})
|
})
|
||||||
@@ -646,7 +551,7 @@ describe('Deployment', () => {
|
|||||||
expect(core.error).toBeCalledWith('Timeout reached, aborting!')
|
expect(core.error).toBeCalledWith('Timeout reached, aborting!')
|
||||||
expect(core.setFailed).toBeCalledWith('Timeout reached, aborting!')
|
expect(core.setFailed).toBeCalledWith('Timeout reached, aborting!')
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
cancelDeploymentScope.done()
|
cancelDeploymentScope.done()
|
||||||
})
|
})
|
||||||
@@ -654,18 +559,18 @@ describe('Deployment', () => {
|
|||||||
it('sets output to success when timeout is set but not reached', async () => {
|
it('sets output to success when timeout is set but not reached', async () => {
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
process.env.GITHUB_SHA = 'valid-build-version'
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
.reply(200, {
|
||||||
total_count: 1,
|
value: [
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
{ url: 'https://another-artifact.com', name: 'another-artifact' },
|
||||||
|
{ url: 'https://fake-artifact.com', name: 'github-pages' }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA,
|
pages_build_version: process.env.GITHUB_SHA,
|
||||||
oidc_token: fakeJwt
|
oidc_token: fakeJwt
|
||||||
})
|
})
|
||||||
@@ -715,7 +620,7 @@ describe('Deployment', () => {
|
|||||||
expect(core.setOutput).toBeCalledWith('status', 'succeed')
|
expect(core.setOutput).toBeCalledWith('status', 'succeed')
|
||||||
expect(core.info).toHaveBeenLastCalledWith('Reported success!')
|
expect(core.info).toHaveBeenLastCalledWith('Reported success!')
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
deploymentStatusScope.done()
|
deploymentStatusScope.done()
|
||||||
})
|
})
|
||||||
@@ -725,18 +630,18 @@ describe('Deployment', () => {
|
|||||||
it('can successfully cancel a deployment', async () => {
|
it('can successfully cancel a deployment', async () => {
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
process.env.GITHUB_SHA = 'valid-build-version'
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
.reply(200, {
|
||||||
total_count: 1,
|
value: [
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
{ url: 'https://another-artifact.com', name: 'another-artifact' },
|
||||||
|
{ url: 'https://fake-artifact.com', name: 'github-pages' }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA,
|
pages_build_version: process.env.GITHUB_SHA,
|
||||||
oidc_token: fakeJwt
|
oidc_token: fakeJwt
|
||||||
})
|
})
|
||||||
@@ -760,7 +665,7 @@ describe('Deployment', () => {
|
|||||||
|
|
||||||
expect(core.info).toHaveBeenLastCalledWith(`Canceled deployment with ID ${process.env.GITHUB_SHA}`)
|
expect(core.info).toHaveBeenLastCalledWith(`Canceled deployment with ID ${process.env.GITHUB_SHA}`)
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
cancelDeploymentScope.done()
|
cancelDeploymentScope.done()
|
||||||
})
|
})
|
||||||
@@ -781,18 +686,18 @@ describe('Deployment', () => {
|
|||||||
it('catches an error when trying to cancel a deployment', async () => {
|
it('catches an error when trying to cancel a deployment', async () => {
|
||||||
process.env.GITHUB_SHA = 'valid-build-version'
|
process.env.GITHUB_SHA = 'valid-build-version'
|
||||||
|
|
||||||
const artifactMetadataScope = nock(`https://api.github.com`)
|
const artifactExchangeScope = nock(`http://my-url`)
|
||||||
.get(
|
.get('/_apis/pipelines/workflows/123/artifacts?api-version=6.0-preview')
|
||||||
`/repos/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}/artifacts?name=github-pages`
|
|
||||||
)
|
|
||||||
.reply(200, {
|
.reply(200, {
|
||||||
total_count: 1,
|
value: [
|
||||||
artifacts: [{ id: 11, name: `github-pages`, size_in_bytes: 221 }]
|
{ url: 'https://another-artifact.com', name: 'another-artifact' },
|
||||||
|
{ url: 'https://fake-artifact.com', name: 'github-pages' }
|
||||||
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const createDeploymentScope = nock('https://api.github.com')
|
const createDeploymentScope = nock('https://api.github.com')
|
||||||
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
.post(`/repos/${process.env.GITHUB_REPOSITORY}/pages/deployments`, {
|
||||||
artifact_id: 11,
|
artifact_url: 'https://fake-artifact.com&%24expand=SignedContent',
|
||||||
pages_build_version: process.env.GITHUB_SHA,
|
pages_build_version: process.env.GITHUB_SHA,
|
||||||
oidc_token: fakeJwt
|
oidc_token: fakeJwt
|
||||||
})
|
})
|
||||||
@@ -817,7 +722,7 @@ describe('Deployment', () => {
|
|||||||
|
|
||||||
expect(core.error).toHaveBeenCalledWith(`Canceling Pages deployment failed`, expect.anything())
|
expect(core.error).toHaveBeenCalledWith(`Canceling Pages deployment failed`, expect.anything())
|
||||||
|
|
||||||
artifactMetadataScope.done()
|
artifactExchangeScope.done()
|
||||||
createDeploymentScope.done()
|
createDeploymentScope.done()
|
||||||
cancelDeploymentScope.done()
|
cancelDeploymentScope.done()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,61 +1,119 @@
|
|||||||
const core = require('@actions/core')
|
const core = require('@actions/core')
|
||||||
const github = require('@actions/github')
|
const github = require('@actions/github')
|
||||||
|
const hc = require('@actions/http-client')
|
||||||
|
const { RequestError } = require('@octokit/request-error')
|
||||||
|
const HttpStatusMessages = require('http-status-messages')
|
||||||
|
|
||||||
async function getArtifactMetadata({ githubToken, runId, artifactName }) {
|
// All variables we need from the runtime are loaded here
|
||||||
const octokit = github.getOctokit(githubToken)
|
const getContext = require('./context')
|
||||||
|
|
||||||
|
async function processRuntimeResponse(res, requestOptions) {
|
||||||
|
// Parse the response body as JSON
|
||||||
|
let obj = null
|
||||||
try {
|
try {
|
||||||
core.info(`Fetching artifact metadata for ${artifactName} in run ${runId}`)
|
const contents = await res.readBody()
|
||||||
|
if (contents && contents.length > 0) {
|
||||||
const response = await octokit.request(
|
obj = JSON.parse(contents)
|
||||||
'GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts?name={artifactName}',
|
|
||||||
{
|
|
||||||
owner: github.context.repo.owner,
|
|
||||||
repo: github.context.repo.repo,
|
|
||||||
run_id: runId,
|
|
||||||
artifactName: artifactName
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
const artifactCount = response.data.total_count
|
|
||||||
core.debug(`List artifact count: ${artifactCount}`)
|
|
||||||
|
|
||||||
if (artifactCount === 0) {
|
|
||||||
throw new Error(
|
|
||||||
`No artifacts found for workflow run ${runId}. Ensure artifacts are uploaded with actions/artifact@v4 or later.`
|
|
||||||
)
|
|
||||||
} else if (artifactCount > 1) {
|
|
||||||
throw new Error(
|
|
||||||
`Multiple artifact unexpectedly found for workflow run ${runId}. Artifact count is ${artifactCount}.`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
const artifact = response.data.artifacts[0]
|
|
||||||
core.debug(`Artifact: ${JSON.stringify(artifact)}`)
|
|
||||||
|
|
||||||
const artifactSize = artifact.size_in_bytes
|
|
||||||
if (!artifactSize) {
|
|
||||||
core.warning('Artifact size was not found. Unable to verify if artifact size exceeds the allowed size.')
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: artifact.id,
|
|
||||||
size: artifactSize
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.error(
|
// Invalid resource (contents not json); leaving resulting obj as null
|
||||||
'Fetching artifact metadata failed. Is githubstatus.com reporting issues with API requests, Pages or Actions? Please re-run the deployment at a later time.',
|
}
|
||||||
error
|
|
||||||
)
|
// Specific response shape aligned with Octokit
|
||||||
|
const response = {
|
||||||
|
url: res.message?.url || requestOptions.url,
|
||||||
|
status: res.message?.statusCode || 0,
|
||||||
|
headers: {
|
||||||
|
...res.message?.headers
|
||||||
|
},
|
||||||
|
data: obj
|
||||||
|
}
|
||||||
|
|
||||||
|
// Forcibly throw errors for negative HTTP status codes!
|
||||||
|
// @actions/http-client doesn't do this by default.
|
||||||
|
// Mimic the errors thrown by Octokit for consistency.
|
||||||
|
if (response.status >= 400) {
|
||||||
|
// Try to get an error message from the response body
|
||||||
|
const errorMsg =
|
||||||
|
(typeof response.data === 'string' && response.data) ||
|
||||||
|
response.data?.error ||
|
||||||
|
response.data?.message ||
|
||||||
|
// Try the Node HTTP IncomingMessage's statusMessage property
|
||||||
|
res.message?.statusMessage ||
|
||||||
|
// Fallback to the HTTP status message based on the status code
|
||||||
|
HttpStatusMessages[response.status] ||
|
||||||
|
// Or if the status code is unexpected...
|
||||||
|
`Unknown error (${response.status})`
|
||||||
|
|
||||||
|
throw new RequestError(errorMsg, response.status, {
|
||||||
|
response,
|
||||||
|
request: requestOptions
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return response
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getSignedArtifactMetadata({ runtimeToken, workflowRunId, artifactName }) {
|
||||||
|
const { runTimeUrl: RUNTIME_URL } = getContext()
|
||||||
|
const artifactExchangeUrl = `${RUNTIME_URL}_apis/pipelines/workflows/${workflowRunId}/artifacts?api-version=6.0-preview`
|
||||||
|
|
||||||
|
const httpClient = new hc.HttpClient()
|
||||||
|
let data = null
|
||||||
|
|
||||||
|
try {
|
||||||
|
const requestHeaders = {
|
||||||
|
accept: 'application/json',
|
||||||
|
authorization: `Bearer ${runtimeToken}`
|
||||||
|
}
|
||||||
|
const requestOptions = {
|
||||||
|
method: 'GET',
|
||||||
|
url: artifactExchangeUrl,
|
||||||
|
headers: {
|
||||||
|
...requestHeaders
|
||||||
|
},
|
||||||
|
body: null
|
||||||
|
}
|
||||||
|
|
||||||
|
core.info(`Artifact exchange URL: ${artifactExchangeUrl}`)
|
||||||
|
const res = await httpClient.get(artifactExchangeUrl, requestHeaders)
|
||||||
|
|
||||||
|
// May throw a RequestError (HttpError)
|
||||||
|
const response = await processRuntimeResponse(res, requestOptions)
|
||||||
|
|
||||||
|
data = response.data
|
||||||
|
core.debug(JSON.stringify(data))
|
||||||
|
} catch (error) {
|
||||||
|
core.error('Getting signed artifact URL failed', error)
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const artifact = data?.value?.find(artifact => artifact.name === artifactName)
|
||||||
|
const artifactRawUrl = artifact?.url
|
||||||
|
if (!artifactRawUrl) {
|
||||||
|
throw new Error(
|
||||||
|
'No uploaded artifact was found! Please check if there are any errors at build step, or uploaded artifact name is correct.'
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
const signedArtifactUrl = `${artifactRawUrl}&%24expand=SignedContent`
|
||||||
|
|
||||||
|
const artifactSize = artifact?.size
|
||||||
|
if (!artifactSize) {
|
||||||
|
core.warning('Artifact size was not found. Unable to verify if artifact size exceeds the allowed size.')
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
url: signedArtifactUrl,
|
||||||
|
size: artifactSize
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function createPagesDeployment({ githubToken, artifactId, buildVersion, idToken, isPreview = false }) {
|
async function createPagesDeployment({ githubToken, artifactUrl, buildVersion, idToken, isPreview = false }) {
|
||||||
const octokit = github.getOctokit(githubToken)
|
const octokit = github.getOctokit(githubToken)
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
artifact_id: artifactId,
|
artifact_url: artifactUrl,
|
||||||
pages_build_version: buildVersion,
|
pages_build_version: buildVersion,
|
||||||
oidc_token: idToken
|
oidc_token: idToken
|
||||||
}
|
}
|
||||||
@@ -115,7 +173,7 @@ async function cancelPagesDeployment({ githubToken, deploymentId }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
getArtifactMetadata,
|
getSignedArtifactMetadata,
|
||||||
createPagesDeployment,
|
createPagesDeployment,
|
||||||
getPagesDeploymentStatus,
|
getPagesDeploymentStatus,
|
||||||
cancelPagesDeployment
|
cancelPagesDeployment
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ const core = require('@actions/core')
|
|||||||
// Load variables from Actions runtime
|
// Load variables from Actions runtime
|
||||||
function getRequiredVars() {
|
function getRequiredVars() {
|
||||||
return {
|
return {
|
||||||
|
runTimeUrl: process.env.ACTIONS_RUNTIME_URL,
|
||||||
workflowRun: process.env.GITHUB_RUN_ID,
|
workflowRun: process.env.GITHUB_RUN_ID,
|
||||||
|
runTimeToken: process.env.ACTIONS_RUNTIME_TOKEN,
|
||||||
repositoryNwo: process.env.GITHUB_REPOSITORY,
|
repositoryNwo: process.env.GITHUB_REPOSITORY,
|
||||||
buildVersion: process.env.GITHUB_SHA,
|
buildVersion: process.env.GITHUB_SHA,
|
||||||
buildActor: process.env.GITHUB_ACTOR,
|
buildActor: process.env.GITHUB_ACTOR,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ const core = require('@actions/core')
|
|||||||
// All variables we need from the runtime are loaded here
|
// All variables we need from the runtime are loaded here
|
||||||
const getContext = require('./context')
|
const getContext = require('./context')
|
||||||
const {
|
const {
|
||||||
getArtifactMetadata,
|
getSignedArtifactMetadata,
|
||||||
createPagesDeployment,
|
createPagesDeployment,
|
||||||
getPagesDeploymentStatus,
|
getPagesDeploymentStatus,
|
||||||
cancelPagesDeployment
|
cancelPagesDeployment
|
||||||
@@ -17,7 +17,7 @@ const temporaryErrorStatus = {
|
|||||||
|
|
||||||
const finalErrorStatus = {
|
const finalErrorStatus = {
|
||||||
deployment_failed: 'Deployment failed, try again later.',
|
deployment_failed: 'Deployment failed, try again later.',
|
||||||
deployment_perms_error: 'Deployment failed, Please ensure that the file permissions are correct.',
|
deployment_perms_error: 'Deployment failed. Please ensure that the file permissions are correct.',
|
||||||
deployment_content_failed:
|
deployment_content_failed:
|
||||||
'Artifact could not be deployed. Please ensure the content does not contain any hard links, symlinks and total size is less than 10GB.',
|
'Artifact could not be deployed. Please ensure the content does not contain any hard links, symlinks and total size is less than 10GB.',
|
||||||
deployment_cancelled: 'Deployment cancelled.',
|
deployment_cancelled: 'Deployment cancelled.',
|
||||||
@@ -31,7 +31,9 @@ const SIZE_LIMIT_DESCRIPTION = '1 GB'
|
|||||||
class Deployment {
|
class Deployment {
|
||||||
constructor() {
|
constructor() {
|
||||||
const context = getContext()
|
const context = getContext()
|
||||||
|
this.runTimeUrl = context.runTimeUrl
|
||||||
this.repositoryNwo = context.repositoryNwo
|
this.repositoryNwo = context.repositoryNwo
|
||||||
|
this.runTimeToken = context.runTimeToken
|
||||||
this.buildVersion = context.buildVersion
|
this.buildVersion = context.buildVersion
|
||||||
this.buildActor = context.buildActor
|
this.buildActor = context.buildActor
|
||||||
this.actionsId = context.actionsId
|
this.actionsId = context.actionsId
|
||||||
@@ -46,8 +48,8 @@ class Deployment {
|
|||||||
this.startTime = null
|
this.startTime = null
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call GitHub api to fetch artifacts matching the provided name and deploy to GitHub Pages
|
// Ask the runtime for the unsigned artifact URL and deploy to GitHub Pages
|
||||||
// by creating a deployment with that artifact id
|
// by creating a deployment with that artifact
|
||||||
async create(idToken) {
|
async create(idToken) {
|
||||||
if (Number(core.getInput('timeout')) > MAX_TIMEOUT) {
|
if (Number(core.getInput('timeout')) > MAX_TIMEOUT) {
|
||||||
core.warning(
|
core.warning(
|
||||||
@@ -63,9 +65,9 @@ class Deployment {
|
|||||||
core.debug(`Action ID: ${this.actionsId}`)
|
core.debug(`Action ID: ${this.actionsId}`)
|
||||||
core.debug(`Actions Workflow Run ID: ${this.workflowRun}`)
|
core.debug(`Actions Workflow Run ID: ${this.workflowRun}`)
|
||||||
|
|
||||||
const artifactData = await getArtifactMetadata({
|
const artifactData = await getSignedArtifactMetadata({
|
||||||
githubToken: this.githubToken,
|
runtimeToken: this.runTimeToken,
|
||||||
runId: this.workflowRun,
|
workflowRunId: this.workflowRun,
|
||||||
artifactName: this.artifactName
|
artifactName: this.artifactName
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -77,7 +79,7 @@ class Deployment {
|
|||||||
|
|
||||||
const deployment = await createPagesDeployment({
|
const deployment = await createPagesDeployment({
|
||||||
githubToken: this.githubToken,
|
githubToken: this.githubToken,
|
||||||
artifactId: artifactData.id,
|
artifactUrl: artifactData.url,
|
||||||
buildVersion: this.buildVersion,
|
buildVersion: this.buildVersion,
|
||||||
idToken,
|
idToken,
|
||||||
isPreview: this.isPreview
|
isPreview: this.isPreview
|
||||||
|
|||||||
Reference in New Issue
Block a user