Fix PR workflow by chaining actions

aacbc5b6db0252847e20040ee828354002e2bda0

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +14 -4Showing whitespace changes
.github/workflows/pr-auto-manager.yml+14 -4
@@ -39,9 +39,13 @@ jobs:
3939
4040 label-by-branches:
4141 name: 🏷️ Label PR by Branches
42+ needs: [label-by-size]
4243 runs-on: ubuntu-latest
44+ # Run, even if the previous jobs were skipped/failed
4345 # Only label once when PR is created or branches are changed, to allow manual label removal
44- if: github.event.action == 'opened' || (github.event.action == 'synchronize' && (github.event.changes.base || github.event.changes.head))
46+ if: |
47+ always()
48+ && github.event.action == 'opened' || (github.event.action == 'synchronize' && (github.event.changes.base || github.event.changes.head))
4549
4650 steps:
4751 - name: Checkout Repository
@@ -59,7 +63,10 @@ jobs:
5963
6064 label-by-files:
6165 name: 🏷️ Label PR by Files
66+ needs: [label-by-branches]
6267 runs-on: ubuntu-latest
68+ # Run, even if the previous jobs were skipped/failed
69+ if: always()
6370
6471 steps:
6572 - name: Checkout Repository
@@ -77,9 +84,12 @@ jobs:
7784
7885 remove-stale-label:
7986 name: 🗑️ Remove Stale Label on Comment
87+ needs: [label-by-files]
8088 runs-on: ubuntu-latest
8189 # Only runs when this is not done by the github actions bot
82- if: github.event_name == 'pull_request_review_comment' && github.actor != 'github-actions[bot]'
90+ if: |
91+ always()
92+ && github.event_name == 'pull_request_review_comment' && github.actor != 'github-actions[bot]'
8393
8494 steps:
8595 - name: Remove Stale Label
@@ -94,7 +104,7 @@ jobs:
94104
95105 check-merge-blocking-labels:
96106 name: 🚫 Check Merge Blocking Labels
97107 needs: [label-by-size, label-by-branches, label-by-files, remove-stale-label]
98108 runs-on: ubuntu-latest
99109 # Run, even if the previous jobs were skipped/failed
100110 if: always()
@@ -144,7 +154,7 @@ jobs:
144154
145155 write-auto-comments:
146156 name: 💬 Post PR Comments Based on Labels
147157 needs: [label-by-size, label-by-branches, label-by-files, remove-stale-label]
148158 runs-on: ubuntu-latest
149159 # Run, even if the previous jobs were skipped/failed
150160 if: always()