Merge pull request #3702 from SillyTavern/hotfix-pr-workflow-v2

Hotfix pr workflow v2
This commit is contained in:
Cohee
2025-03-16 23:46:11 +02:00
committed by GitHub

View File

@@ -19,7 +19,7 @@ jobs:
- name: Label PR Size - name: Label PR Size
# Pull Request Size Labeler # Pull Request Size Labeler
# https://github.com/marketplace/actions/pull-request-size-labeler # https://github.com/marketplace/actions/pull-request-size-labeler
uses: codelytv/pr-size-labeler@v1.10.2 uses: codelytv/pr-size-labeler@v1.10.1
with: with:
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
xs_label: '🟩 ⬤○○○○' xs_label: '🟩 ⬤○○○○'
@@ -39,13 +39,9 @@ jobs:
label-by-branches: label-by-branches:
name: 🏷️ Label PR by Branches name: 🏷️ Label PR by Branches
needs: [label-by-size]
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Run, even if the previous jobs were skipped/failed
# Only label once when PR is created or branches are changed, to allow manual label removal # Only label once when PR is created or branches are changed, to allow manual label removal
if: | if: github.event.action == 'opened' || (github.event.action == 'synchronize' && (github.event.changes.base || github.event.changes.head))
always()
&& github.event.action == 'opened' || (github.event.action == 'synchronize' && (github.event.changes.base || github.event.changes.head))
steps: steps:
- name: Checkout Repository - name: Checkout Repository
@@ -63,10 +59,7 @@ jobs:
label-by-files: label-by-files:
name: 🏷️ Label PR by Files name: 🏷️ Label PR by Files
needs: [label-by-branches]
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Run, even if the previous jobs were skipped/failed
if: always()
steps: steps:
- name: Checkout Repository - name: Checkout Repository
@@ -84,12 +77,9 @@ jobs:
remove-stale-label: remove-stale-label:
name: 🗑️ Remove Stale Label on Comment name: 🗑️ Remove Stale Label on Comment
needs: [label-by-files]
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Only runs when this is not done by the github actions bot # Only runs when this is not done by the github actions bot
if: | if: github.event_name == 'pull_request_review_comment' && github.actor != 'github-actions[bot]'
always()
&& github.event_name == 'pull_request_review_comment' && github.actor != 'github-actions[bot]'
steps: steps:
- name: Remove Stale Label - name: Remove Stale Label
@@ -104,7 +94,7 @@ jobs:
check-merge-blocking-labels: check-merge-blocking-labels:
name: 🚫 Check Merge Blocking Labels name: 🚫 Check Merge Blocking Labels
needs: [label-by-size, label-by-branches, label-by-files, remove-stale-label] needs: [label-by-branches, label-by-files]
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Run, even if the previous jobs were skipped/failed # Run, even if the previous jobs were skipped/failed
if: always() if: always()
@@ -154,7 +144,7 @@ jobs:
write-auto-comments: write-auto-comments:
name: 💬 Post PR Comments Based on Labels name: 💬 Post PR Comments Based on Labels
needs: [label-by-size, label-by-branches, label-by-files, remove-stale-label] needs: [label-by-size, label-by-branches, label-by-files]
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Run, even if the previous jobs were skipped/failed # Run, even if the previous jobs were skipped/failed
if: always() if: always()