mirror of
https://github.com/actions/deploy-pages.git
synced 2025-12-08 16:16:16 +00:00
move artifact url out of context
This commit is contained in:
3
dist/index.js
vendored
3
dist/index.js
vendored
@@ -7059,7 +7059,6 @@ function getRequiredVars() {
|
||||
actionsId: process.env.GITHUB_ACTION,
|
||||
githubApiUrl: process.env.GITHUB_API_URL ?? `https://api.github.com`,
|
||||
githubToken: core.getInput('token'),
|
||||
artifactName: core.getInput('artifact_name'),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7108,7 +7107,7 @@ class Deployment {
|
||||
this.requestedDeployment = false
|
||||
this.deploymentInfo = null
|
||||
this.githubApiUrl = context.githubApiUrl
|
||||
this.artifactName = context.artifactName
|
||||
this.artifactName = core.getInput('artifact_name')
|
||||
}
|
||||
|
||||
// Ask the runtime for the unsigned artifact URL and deploy to GitHub Pages
|
||||
|
||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -7059,7 +7059,6 @@ function getRequiredVars() {
|
||||
actionsId: process.env.GITHUB_ACTION,
|
||||
githubApiUrl: process.env.GITHUB_API_URL ?? `https://api.github.com`,
|
||||
githubToken: core.getInput('token'),
|
||||
artifactName: core.getInput('artifact_name'),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7108,7 +7107,7 @@ class Deployment {
|
||||
this.requestedDeployment = false
|
||||
this.deploymentInfo = null
|
||||
this.githubApiUrl = context.githubApiUrl
|
||||
this.artifactName = context.artifactName
|
||||
this.artifactName = core.getInput('artifact_name')
|
||||
}
|
||||
|
||||
// Ask the runtime for the unsigned artifact URL and deploy to GitHub Pages
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -12,7 +12,6 @@ function getRequiredVars() {
|
||||
actionsId: process.env.GITHUB_ACTION,
|
||||
githubApiUrl: process.env.GITHUB_API_URL ?? `https://api.github.com`,
|
||||
githubToken: core.getInput('token'),
|
||||
artifactName: core.getInput('artifact_name'),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class Deployment {
|
||||
this.requestedDeployment = false
|
||||
this.deploymentInfo = null
|
||||
this.githubApiUrl = context.githubApiUrl
|
||||
this.artifactName = context.artifactName
|
||||
this.artifactName = core.getInput('artifact_name')
|
||||
}
|
||||
|
||||
// Ask the runtime for the unsigned artifact URL and deploy to GitHub Pages
|
||||
|
||||
@@ -20,18 +20,9 @@ describe('with all environment variables set', () => {
|
||||
process.env.GITHUB_ACTOR = 'monalisa'
|
||||
process.env.GITHUB_ACTION = '__monalisa/octocat'
|
||||
process.env.GITHUB_ACTION_PATH = 'something'
|
||||
jest.spyOn(core, 'getInput').mockImplementation(param => {
|
||||
switch (param) {
|
||||
case 'artifact_name':
|
||||
return 'github-pages'
|
||||
case 'token':
|
||||
return process.env.GITHUB_TOKEN
|
||||
}
|
||||
})
|
||||
jest.setTimeout(10 * 1000)
|
||||
})
|
||||
|
||||
it('Executes cleanly', done => {
|
||||
it.only('Executes cleanly', done => {
|
||||
const ip = path.join(__dirname, './index.js')
|
||||
cp.exec(`node ${ip}`, { env: process.env }, (err, stdout) => {
|
||||
expect(stdout).toMatch(/::debug::all variables are set/)
|
||||
|
||||
Reference in New Issue
Block a user