99
1010# defined at workflow-level as the workflow, Requires these permissions to function.
1111permissions :
12- contents : write
12+ contents : read
1313 pull-requests : write
1414 # All Pull Requests are issues, but not all issues are Pull Requests (like GitHub says 🙃)
1515 issues : write
3939 clean : false
4040 fetch-depth : 0
4141 persist-credentials : false
42- # Checkout pull request HEAD commit instead of merge commit
43- ref : ${{ github.event.pull_request.head.sha }}
4442
4543 - name : Remove Manually added PR Label
4644 if : |
@@ -78,20 +76,29 @@ jobs:
7876 with :
7977 is_PR : true
8078 PR_NUMBER : ${{ github.event.pull_request.number }}
79+ is_trusted_pr : ${{ github.event.pull_request.head.repo.full_name == github.repository }}
8180 skip_tagging_and_releases : true
8281
8382 update_Last_Comment :
8483 needs : [job_trigger,trigger_builder]
8584 runs-on : ubuntu-latest
86- if : ${{ github.repository_owner == 'Acode-Foundation' && always() && contains(fromJSON('["failure","cancelled"]'), needs.trigger_builder.result) }}
85+ if : ${{ github.repository_owner == 'Acode-Foundation' && always() && contains(fromJSON('["failure","cancelled", "success" ]'), needs.trigger_builder.result) }}
8786 steps :
88- # - name: Checkout code
89- # uses: actions/checkout@v4
90- # with:
91- # clean: false
92- # fetch-depth: 0
87+
88+ - name : Update Last Comment by bot (If Workflow Triggering succeeded)
89+ if : ${{ needs.trigger_builder.result == 'success' && github.event.pull_request.number }}
90+ uses : marocchino/sticky-pull-request-comment@v3
91+ with :
92+ hide_and_recreate : true
93+ hide_classify : " OUTDATED"
94+ header : on-demand-build-status
95+ message : |
96+ Preview Release for this, has been built.
97+
98+ [Click here to view that github actions build](https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id }})
9399
94100 - name : Update Last Comment by bot (if Workflow Triggering failed)
101+ if : ${{ needs.trigger_builder.result != 'success' && github.event.pull_request.number }}
95102 uses : marocchino/sticky-pull-request-comment@v3
96103 with :
97104 hide_and_recreate : true
@@ -102,4 +109,4 @@ jobs:
102109 status: **${{ needs.trigger_builder.result || 'failure'}}**
103110
104111 ---
105- For Owners: Please [Click here to view that github actions](https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id }})
112+ Please [Click here to view that github actions](https://github.com/${{ github.repository}}/actions/runs/${{ github.run_id }})
0 commit comments