Skip to content

Commit

Permalink
fix finish job and branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mordamax committed Jan 21, 2025
1 parent d38ca61 commit 30bc738
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/cmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,9 @@ jobs:
# lowerdown permissions to separate permissions context for executable parts by contributors
permissions:
contents: read
pull-requests: read
actions: read
issues: read
pull-requests: none
actions: none
issues: none
outputs:
cmd_output: ${{ steps.cmd.outputs.cmd_output }}
subweight: ${{ steps.subweight.outputs.result }}
Expand Down Expand Up @@ -414,15 +414,16 @@ jobs:
if: startsWith(needs.get-pr-info.outputs.CMD, 'bench')
shell: bash
run: |
git fetch
echo $(git log -n 2 --oneline)
result=$(subweight compare commits \
--path-pattern "./**/weights/**/*.rs,./**/weights.rs" \
--method asymptotic \
--format markdown \
--no-color \
--change added changed \
--ignore-errors \
refs/remotes/origin/master HEAD)
refs/remotes/origin/master $PR_BRANCH)
# Save the multiline result to the output
{
Expand Down Expand Up @@ -521,12 +522,12 @@ jobs:
})
finish:
needs: [before-cmd, after-cmd]
needs: [before-cmd, after-cmd, cmd]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Comment PR (Failure)
if: ${{ failure() && !contains(github.event.comment.body, '--quiet') }}
if: ${{ needs.cmd.result == 'failure' || needs.after-cmd.result == 'failure' }}
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -547,8 +548,8 @@ jobs:
})
- name: Add 😕 reaction on failure
if: ${{ needs.cmd.result == 'failure' || needs.after-cmd.result == 'failure' }}
uses: actions/github-script@v7
if: ${{ failure() }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand All @@ -560,8 +561,8 @@ jobs:
})
- name: Add 👍 reaction on success
if: ${{ needs.cmd.result == 'success' && needs.after-cmd.result == 'success' }}
uses: actions/github-script@v7
if: ${{ !failure() }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down

0 comments on commit 30bc738

Please sign in to comment.