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 30bc738 commit 1b57768
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/cmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ jobs:
echo "IS_ORG_MEMBER: $IS_ORG_MEMBER"
git config --global --add safe.directory $GITHUB_WORKSPACE
git config user.name "cmd[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# if the user is not an org member, we need to use the bot's path from master to avoid unwanted modifications
if [ "$IS_ORG_MEMBER" = "true" ]; then
Expand Down Expand Up @@ -452,7 +455,10 @@ jobs:
run: |
ls -lsaR command-diff
git config --global --add safe.directory '*'
git config --global --add safe.directory $GITHUB_WORKSPACE
git config user.name "cmd[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global pull.rebase false
echo "Applying $file"
git apply "command-diff/command_diff.patch" --unidiff-zero
Expand All @@ -462,9 +468,6 @@ jobs:
git status
if [ -n "$(git status --porcelain)" ]; then
git config user.name "cmd[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global pull.rebase false
# Push the results to the target branch
git remote add \
Expand Down Expand Up @@ -492,7 +495,7 @@ jobs:
- name: Comment PR (End)
# No need to comment on prdoc success or --quiet
if: ${{ !failure() && !contains(github.event.comment.body, '--quiet') && !startsWith(needs.get-pr-info.outputs.CMD, 'prdoc') && !startsWith(needs.get-pr-info.outputs.CMD, 'fmt') }}
if: ${{ needs.cmd.result == 'success' && !contains(github.event.comment.body, '--quiet') && !startsWith(needs.get-pr-info.outputs.CMD, 'prdoc') && !startsWith(needs.get-pr-info.outputs.CMD, 'fmt') }}
uses: actions/github-script@v7
env:
SUBWEIGHT: "${{ needs.cmd.outputs.subweight }}"
Expand All @@ -501,8 +504,8 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
let runUrl = ${{ needs.before-cmd.outputs.run_url }}
let subweight = process.env.SUBWEIGHT;
let cmdOutput = process.env.CMD_OUTPUT;
let subweight = process.env.SUBWEIGHT || '';
let cmdOutput = process.env.CMD_OUTPUT || '';
let cmd = process.env.CMD;
console.log(cmdOutput);
Expand Down

0 comments on commit 1b57768

Please sign in to comment.