diff --git a/.github/workflows/trl-ci-bot.yml b/.github/workflows/trl-ci-bot.yml index c55c440fff11..67b5632684e8 100644 --- a/.github/workflows/trl-ci-bot.yml +++ b/.github/workflows/trl-ci-bot.yml @@ -33,10 +33,11 @@ jobs: - name: Ignore untrusted commenter if: steps.trust.outputs.trusted != 'true' run: | - echo "Untrusted commenter; ignoring." + echo "Untrusted commenter, stop the workflow!" exit 0 - name: Fetch PR head SHA + number + if: steps.trust.outputs.trusted == 'true' id: pr env: GH_TOKEN: ${{ github.token }} @@ -48,6 +49,7 @@ jobs: echo "number=$number" >> $GITHUB_OUTPUT - name: Dispatch TRL workflow + if: steps.trust.outputs.trusted == 'true' id: dispatch env: GH_TOKEN: ${{ secrets.TRL_CI_DISPATCH_TOKEN }} @@ -57,6 +59,7 @@ jobs: -f transformers_ref=${{ steps.pr.outputs.sha }} - name: Find TRL workflow run URL + if: steps.trust.outputs.trusted == 'true' id: find_run env: GH_TOKEN: ${{ secrets.TRL_CI_DISPATCH_TOKEN }} @@ -82,6 +85,7 @@ jobs: done - name: Comment back on PR with link + if: steps.trust.outputs.trusted == 'true' env: GH_TOKEN: ${{ github.token }} run: |