Skip to content

Commit

Permalink
Merge pull request #217 from github/output-msg-fixes
Browse files Browse the repository at this point in the history
Output msg fixes
GrantBirki authored Oct 16, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 4542b16 + f5bb7bc commit eb93668
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -424,6 +424,9 @@ export async function run() {
param_separator // param_separator action input
)

// convert the environmentObj to a json string and debug log it
core.debug(`environmentObj: ${JSON.stringify(environmentObj)}`)

// deconstruct the environment object to get the environment
environment = environmentObj.environment

@@ -458,7 +461,7 @@ export async function run() {
core.setOutput('ref', precheckResults.ref)
core.saveState('ref', precheckResults.ref)
core.setOutput('sha', precheckResults.sha)
core.debug(`sha: ${precheckResults.sha}`)
core.debug(`precheckResults.sha: ${precheckResults.sha}`)

// If the prechecks failed, run the actionStatus function and return
// note: if we don't pass in the 'success' bool, actionStatus will default to failure mode
@@ -529,7 +532,8 @@ export async function run() {
if (precheckResults.noopMode) {
deploymentType = 'noop'
} else {
deploymentType = environmentObj.sha !== null ? 'sha' : 'Branch'
deploymentType =
environmentObj.environmentObj.sha !== null ? 'sha' : 'Branch'
}
const log_url = `${process.env.GITHUB_SERVER_URL}/${context.repo.owner}/${context.repo.repo}/actions/runs/${process.env.GITHUB_RUN_ID}`
const commentBody = dedent(`

0 comments on commit eb93668

Please sign in to comment.