Merge pull request #3702 from SillyTavern/hotfix-pr-workflow-v2 Hotfix pr workflow v2
Signed| @@ -19,7 +19,7 @@ jobs: | |||
| 19 | - name: Label PR Size | 19 | - name: Label PR Size |
| 20 | # Pull Request Size Labeler | 20 | # Pull Request Size Labeler |
| 21 | # https://github.com/marketplace/actions/pull-request-size-labeler | 21 | # https://github.com/marketplace/actions/pull-request-size-labeler |
| 22 | uses: codelytv/pr-size-labeler@v1.10.2 | 22 | uses: codelytv/pr-size-labeler@v1.10.1 |
| 23 | with: | 23 | with: |
| 24 | GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | 24 | GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 25 | xs_label: 'π© ⬀ββββ' | 25 | xs_label: 'π© ⬀ββββ' |
| @@ -39,13 +39,9 @@ jobs: | |||
| 39 | 39 | ||
| 40 | label-by-branches: | 40 | label-by-branches: |
| 41 | name: π·οΈ Label PR by Branches | 41 | name: π·οΈ Label PR by Branches |
| 42 | needs: [label-by-size] | ||
| 43 | runs-on: ubuntu-latest | 42 | runs-on: ubuntu-latest |
| 44 | # Run, even if the previous jobs were skipped/failed | ||
| 45 | # Only label once when PR is created or branches are changed, to allow manual label removal | 43 | # Only label once when PR is created or branches are changed, to allow manual label removal |
| 46 | if: | | 44 | if: github.event.action == 'opened' || (github.event.action == 'synchronize' && (github.event.changes.base || github.event.changes.head)) |
| 47 | always() | ||
| 48 | && github.event.action == 'opened' || (github.event.action == 'synchronize' && (github.event.changes.base || github.event.changes.head)) | ||
| 49 | 45 | ||
| 50 | steps: | 46 | steps: |
| 51 | - name: Checkout Repository | 47 | - name: Checkout Repository |
| @@ -63,10 +59,7 @@ jobs: | |||
| 63 | 59 | ||
| 64 | label-by-files: | 60 | label-by-files: |
| 65 | name: π·οΈ Label PR by Files | 61 | name: π·οΈ Label PR by Files |
| 66 | needs: [label-by-branches] | ||
| 67 | runs-on: ubuntu-latest | 62 | runs-on: ubuntu-latest |
| 68 | # Run, even if the previous jobs were skipped/failed | ||
| 69 | if: always() | ||
| 70 | 63 | ||
| 71 | steps: | 64 | steps: |
| 72 | - name: Checkout Repository | 65 | - name: Checkout Repository |
| @@ -84,12 +77,9 @@ jobs: | |||
| 84 | 77 | ||
| 85 | remove-stale-label: | 78 | remove-stale-label: |
| 86 | name: ποΈ Remove Stale Label on Comment | 79 | name: ποΈ Remove Stale Label on Comment |
| 87 | needs: [label-by-files] | ||
| 88 | runs-on: ubuntu-latest | 80 | runs-on: ubuntu-latest |
| 89 | # Only runs when this is not done by the github actions bot | 81 | # Only runs when this is not done by the github actions bot |
| 90 | if: | | 82 | if: github.event_name == 'pull_request_review_comment' && github.actor != 'github-actions[bot]' |
| 91 | always() | ||
| 92 | && github.event_name == 'pull_request_review_comment' && github.actor != 'github-actions[bot]' | ||
| 93 | 83 | ||
| 94 | steps: | 84 | steps: |
| 95 | - name: Remove Stale Label | 85 | - name: Remove Stale Label |
| @@ -104,7 +94,7 @@ jobs: | |||
| 104 | 94 | ||
| 105 | check-merge-blocking-labels: | 95 | check-merge-blocking-labels: |
| 106 | name: π« Check Merge Blocking Labels | 96 | name: π« Check Merge Blocking Labels |
| 107 | needs: [label-by-size, label-by-branches, label-by-files, remove-stale-label] | 97 | needs: [label-by-branches, label-by-files] |
| 108 | runs-on: ubuntu-latest | 98 | runs-on: ubuntu-latest |
| 109 | # Run, even if the previous jobs were skipped/failed | 99 | # Run, even if the previous jobs were skipped/failed |
| 110 | if: always() | 100 | if: always() |
| @@ -154,7 +144,7 @@ jobs: | |||
| 154 | 144 | ||
| 155 | write-auto-comments: | 145 | write-auto-comments: |
| 156 | name: π¬ Post PR Comments Based on Labels | 146 | name: π¬ Post PR Comments Based on Labels |
| 157 | needs: [label-by-size, label-by-branches, label-by-files, remove-stale-label] | 147 | needs: [label-by-size, label-by-branches, label-by-files] |
| 158 | runs-on: ubuntu-latest | 148 | runs-on: ubuntu-latest |
| 159 | # Run, even if the previous jobs were skipped/failed | 149 | # Run, even if the previous jobs were skipped/failed |
| 160 | if: always() | 150 | if: always() |