roll into right node syntax

This commit is contained in:
yimysty
2022-08-04 17:09:46 -07:00
parent 06d025f427
commit 99f9079292
7 changed files with 15 additions and 14 deletions

6
dist/index.js vendored
View File

@@ -7058,6 +7058,8 @@ function getRequiredVars() {
buildActor: process.env.GITHUB_ACTOR,
actionsId: process.env.GITHUB_ACTION,
githubToken: core.getInput('token'),
githubApiUrl: process.env.GITHUB_API_URL ?? 'https://api.github.com',
artifactName: core.getInput('artifact_name') ?? 'github-pages'
}
}
@@ -7105,8 +7107,8 @@ class Deployment {
this.workflowRun = context.workflowRun
this.requestedDeployment = false
this.deploymentInfo = null
this.githubApiUrl = process.env.GITHUB_API_URL ? process.env.GITHUB_API_URL : "https://api.github.com",
this.artifactName = core.getInput('artifact_name')
this.githubApiUrl = context.githubApiUrl
this.artifactName = context.artifactName
}
// 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

@@ -7058,6 +7058,8 @@ function getRequiredVars() {
buildActor: process.env.GITHUB_ACTOR,
actionsId: process.env.GITHUB_ACTION,
githubToken: core.getInput('token'),
githubApiUrl: process.env.GITHUB_API_URL ?? 'https://api.github.com',
artifactName: core.getInput('artifact_name') ?? 'github-pages'
}
}
@@ -7105,8 +7107,8 @@ class Deployment {
this.workflowRun = context.workflowRun
this.requestedDeployment = false
this.deploymentInfo = null
this.githubApiUrl = process.env.GITHUB_API_URL ? process.env.GITHUB_API_URL : "https://api.github.com",
this.artifactName = core.getInput('artifact_name')
this.githubApiUrl = context.githubApiUrl
this.artifactName = context.artifactName
}
// 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

@@ -11,6 +11,8 @@ function getRequiredVars() {
buildActor: process.env.GITHUB_ACTOR,
actionsId: process.env.GITHUB_ACTION,
githubToken: core.getInput('token'),
githubApiUrl: process.env.GITHUB_API_URL ?? 'https://api.github.com',
artifactName: core.getInput('artifact_name') ?? 'github-pages'
}
}

View File

@@ -25,8 +25,8 @@ class Deployment {
this.workflowRun = context.workflowRun
this.requestedDeployment = false
this.deploymentInfo = null
this.githubApiUrl = process.env.GITHUB_API_URL ? process.env.GITHUB_API_URL : "https://api.github.com",
this.artifactName = core.getInput('artifact_name')
this.githubApiUrl = context.githubApiUrl
this.artifactName = context.artifactName
}
// Ask the runtime for the unsigned artifact URL and deploy to GitHub Pages

View File

@@ -20,16 +20,11 @@ describe('with all environment variables set', () => {
process.env.GITHUB_ACTOR = 'monalisa'
process.env.GITHUB_ACTION = '__monalisa/octocat'
process.env.GITHUB_ACTION_PATH = 'something'
core.getIDToken = jest.fn().mockResolvedValue("")
})
it.only('Executes cleanly', done => {
it('Executes cleanly', done => {
const ip = path.join(__dirname, './index.js')
cp.exec(`node ${ip}`, { env: process.env }, (err, stdout) => {
console.log("************")
console.log(err)
console.log("************")
console.log(stdout)
expect(stdout).toMatch(/::debug::all variables are set/)
done()
})