Skip to content

Commit

Permalink
Update cmd.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mordamax committed Jan 21, 2025
1 parent 1b57768 commit cac9a67
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/cmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,8 @@ jobs:
uses: actions/download-artifact@v4
with:
name: command-diff

path: command-diff

# needs to be able to trigger CI, as default token does not retrigger
- uses: actions/create-github-app-token@v1
id: generate_token
Expand All @@ -453,6 +454,7 @@ jobs:

- name: Apply & Commit changes
run: |
ls -lsa .
ls -lsaR command-diff
git config --global --add safe.directory $GITHUB_WORKSPACE
Expand Down Expand Up @@ -525,9 +527,12 @@ jobs:
})
finish:
needs: [before-cmd, after-cmd, cmd]
needs: [get-pr-info, before-cmd, after-cmd, cmd]
if: ${{ always() }}
runs-on: ubuntu-latest
env:
CMD_OUTPUT: "${{ needs.cmd.outputs.cmd_output }}"
CMD: ${{ needs.get-pr-info.outputs.CMD }}
steps:
- name: Comment PR (Failure)
if: ${{ needs.cmd.result == 'failure' || needs.after-cmd.result == 'failure' }}
Expand All @@ -539,9 +544,11 @@ jobs:
let cmdOutput = process.env.CMD_OUTPUT;
let cmd = process.env.CMD;
let cmdOutputCollapsed = cmdOutput.trim() !== ''
? `<details>\n\n<summary>Command output:</summary>\n\n${cmdOutput}\n\n</details>`
: '';
if (cmdOutput) {
let cmdOutputCollapsed = cmdOutput.trim() !== ''
? `<details>\n\n<summary>Command output:</summary>\n\n${cmdOutput}\n\n</details>`
: '';
}
github.rest.issues.createComment({
issue_number: context.issue.number,
Expand Down

0 comments on commit cac9a67

Please sign in to comment.