move artifact url out of context

This commit is contained in:
yimysty
2022-08-04 16:23:15 -07:00
parent 225abf7840
commit d0b379e44d
7 changed files with 6 additions and 18 deletions

3
dist/index.js vendored
View File

@@ -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

File diff suppressed because one or more lines are too long

View File

@@ -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

View File

@@ -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'),
}
}

View File

@@ -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

View File

@@ -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/)