Skip to content

Commit

Permalink
workaround permission issue
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc committed Dec 11, 2024
1 parent 5ea5511 commit 5400419
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/command-runner/runOrBump.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,14 @@ module.exports = async ({ github, core, context, commentId, exec, env, command,

if (!diffResult) {
core.info('snapshot not updated')
await exec.exec(`git`, ['commit', '-am', '[ci skip] Update KNOWN_GOOD_BLOCK_NUMBERS'])
await exec.exec('git push')

let commitId = ''
await exec.exec('git', ['rev-parse', 'HEAD'], {
listeners: {
stdout: (data) => {
commitId += data.toString();
}
}
})
// dispatch update-known-good workflow to having it to update the snapshot
await exec.exec(`gh workflow run update-known-good.yml`)

return comment.createOrUpdateComment(createResult({
context,
command: testResult.cmd,
result: output,
extra: `<br/>**KNOWN_GOOD_BLOCK_NUMBERS.env has been updated**<br/>**Commit**: ${commitId}`
extra: `<br/>Triggered update-known-good workflow to update the snapshot`
}))
} else {
const branchName = `Update-SnapShot-${commentId}`
Expand Down

0 comments on commit 5400419

Please sign in to comment.