Skip to content

Commit 2ad8643

Browse files
committed
auto-approve backport PRs
1 parent 202297b commit 2ad8643

File tree

1 file changed

+21
-29
lines changed

1 file changed

+21
-29
lines changed

β€Ž.github/workflows/on_push.ymlβ€Ž

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ on:
2020
type: boolean
2121

2222
jobs:
23-
start-comment:
24-
name: Post Start Comment πŸ’¬
25-
if: ${{ inputs.post_result }}
23+
start:
24+
name: Pipeline Start
2625
runs-on: ubuntu-latest
26+
if: ${{ inputs.post_result }}
2727
steps:
2828
- uses: thollander/actions-comment-pull-request@v3.0.1
2929
with:
@@ -53,17 +53,34 @@ jobs:
5353
name: Docs πŸ“•
5454
uses: ./.github/workflows/run_docs.yml
5555

56-
success:
56+
complete:
5757
name: Pipeline Passed βœ…
5858
if: ${{ !cancelled() }}
5959
runs-on: ubuntu-latest
6060
needs:
61+
- start
6162
- build
6263
- checks
6364
- tests
6465
- docs
6566
steps:
67+
- uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1
68+
if: ${{ inputs.post_result }}
69+
with:
70+
pr-number: ${{ inputs.pr_number || github.event.pull_request.number }}
71+
comment-tag: ci-status
72+
mode: upsert
73+
message: |
74+
CI has finished:
75+
- πŸ“‹ Checks: ${{ needs.checks.result && 'βœ…' || '❌' }}
76+
- πŸ› οΈ Build: ${{ needs.build.result && 'βœ…' || '❌' }}
77+
- πŸ§ͺ Tests: ${{ needs.tests.result && 'βœ…' || '❌' }}
78+
- πŸ“• Docs: ${{ needs.docs.result && 'βœ…' || '❌' }}
79+
80+
[See the logs here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
6681
- shell: pwsh
82+
env:
83+
GH_TOKEN: ${{ github.token }}
6784
run: |
6885
$checks = @{
6986
"Checks" = "${{ needs.checks.result }}"
@@ -82,28 +99,3 @@ jobs:
8299
}
83100
84101
exit $exit
85-
86-
finish-comment:
87-
name: Post Finish Comment πŸ’¬
88-
if: ${{ inputs.post_result }}
89-
needs:
90-
- start-comment
91-
- build
92-
- checks
93-
- tests
94-
- docs
95-
runs-on: ubuntu-latest
96-
steps:
97-
- uses: thollander/actions-comment-pull-request@v3.0.1
98-
with:
99-
pr-number: ${{ inputs.pr_number || github.event.pull_request.number }}
100-
comment-tag: ci-status
101-
mode: upsert
102-
message: |
103-
CI has finished:
104-
- πŸ“‹ Checks: ${{ needs.checks.result && 'βœ…' || '❌' }}
105-
- πŸ› οΈ Build: ${{ needs.build.result && 'βœ…' || '❌' }}
106-
- πŸ§ͺ Tests: ${{ needs.tests.result && 'βœ…' || '❌' }}
107-
- πŸ“• Docs: ${{ needs.docs.result && 'βœ…' || '❌' }}
108-
109-
[See the logs here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})

0 commit comments

Comments
Β (0)