Merge pull request #3719 from SillyTavern/fix-workflows-v2-v1.1 Fixing GitHub Workflows - again (maybe this time it works)
Signed| @@ -14,7 +14,7 @@ | ||
| 14 | 14 | - '(π§ Linux)' |
| 15 | 15 | |
| 16 | 16 | π¦ Firefox: |
| 17 | 17 | - '\b(firefox|mozilla)\b' |
| 18 | 18 | |
| 19 | 19 | π± Mobile: |
| 20 | 20 | - '\b(iphone|ios|android|π± Termux)\b' |
| @@ -34,6 +34,9 @@ | ||
| 34 | 34 | π¦ Firefox: |
| 35 | 35 | - head-branch: ['\bfirefox\b'] |
| 36 | 36 | |
| 37 | +π§βπ€βπ§ Group Chat: | |
| 38 | +- head-branch: ['\bgroups?\b'] | |
| 39 | + | |
| 37 | 40 | πΌοΈ Image Gen: |
| 38 | 41 | - head-branch: ['\bimage-gen\b'] |
| 39 | 42 | |
| @@ -58,6 +61,9 @@ | ||
| 58 | 61 | π Prompt: |
| 59 | 62 | - head-branch: ['\bprompt\b'] |
| 60 | 63 | |
| 64 | +π§ Reasoning: | |
| 65 | +- head-branch: ['\breasoning\b', '\breason\b', '\bthinking\b'] | |
| 66 | + | |
| 61 | 67 | π Refactor: |
| 62 | 68 | - head-branch: ['\brefactor(s|ed)?\b'] |
| 63 | 69 | |
| @@ -32,7 +32,7 @@ jobs: | ||
| 32 | 32 | with: |
| 33 | 33 | configuration-path: .github/issues-auto-labels.yml |
| 34 | 34 | enable-versioned-regex: 0 |
| 35 | 35 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 36 | 36 | |
| 37 | 37 | label-on-labels: |
| 38 | 38 | name: π·οΈ Label Issues by Labels |
| @@ -46,7 +46,7 @@ jobs: | ||
| 46 | 46 | uses: actions-cool/issues-helper@v3.6.0 |
| 47 | 47 | with: |
| 48 | 48 | actions: 'add-labels' |
| 49 | 49 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 50 | 50 | labels: 'π Approved' |
| 51 | 51 | |
| 52 | 52 | - name: β Remove progress labels when issue is marked done or stale |
| @@ -56,7 +56,7 @@ jobs: | ||
| 56 | 56 | uses: actions-cool/issues-helper@v3.6.0 |
| 57 | 57 | with: |
| 58 | 58 | actions: 'remove-labels' |
| 59 | 59 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 60 | 60 | labels: 'π§βπ» In Progress,π€ Unsure,π€ Under Consideration' |
| 61 | 61 | |
| 62 | 62 | - name: β Remove temporary labels when confirmed labels are added |
| @@ -66,7 +66,7 @@ jobs: | ||
| 66 | 66 | uses: actions-cool/issues-helper@v3.6.0 |
| 67 | 67 | with: |
| 68 | 68 | actions: 'remove-labels' |
| 69 | 69 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 70 | 70 | labels: 'π€ Unsure,π€ Under Consideration' |
| 71 | 71 | |
| 72 | 72 | - name: β Remove no bug labels when "πͺ² Confirmed" is added |
| @@ -76,7 +76,7 @@ jobs: | ||
| 76 | 76 | uses: actions-cool/issues-helper@v3.6.0 |
| 77 | 77 | with: |
| 78 | 78 | actions: 'remove-labels' |
| 79 | 79 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 80 | 80 | labels: 'βοΈ Not Reproducible,βοΈ Not A Bug' |
| 81 | 81 | |
| 82 | 82 | remove-stale-label: |
| @@ -92,7 +92,7 @@ jobs: | ||
| 92 | 92 | uses: actions-cool/issues-helper@v3.6.0 |
| 93 | 93 | with: |
| 94 | 94 | actions: 'remove-labels' |
| 95 | 95 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 96 | 96 | issue-number: ${{ github.event.issue.number }} |
| 97 | 97 | labels: 'β°οΈ Stale,πΈοΈ Inactive,π Awaiting User Response,π No Response' |
| 98 | 98 | |
| @@ -113,4 +113,4 @@ jobs: | ||
| 113 | 113 | uses: peaceiris/actions-label-commenter@v1.10.0 |
| 114 | 114 | with: |
| 115 | 115 | config_file: .github/issues-auto-comments.yml |
| 116 | 116 | github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| @@ -31,7 +31,7 @@ jobs: | ||
| 31 | 31 | - name: Label Linked Issues |
| 32 | 32 | id: label_linked_issues |
| 33 | 33 | env: |
| 34 | 34 | GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 35 | 35 | run: | |
| 36 | 36 | for ISSUE in $(echo $issues | jq -r '.[]'); do |
| 37 | 37 | if [ "${{ github.ref }}" == "refs/heads/staging" ]; then |
| @@ -22,7 +22,7 @@ jobs: | ||
| 22 | 22 | # https://github.com/marketplace/actions/close-stale-issues |
| 23 | 23 | uses: actions/stale@v9.1.0 |
| 24 | 24 | with: |
| 25 | 25 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 26 | 26 | days-before-stale: 183 |
| 27 | 27 | days-before-close: 7 |
| 28 | 28 | operations-per-run: 30 |
| @@ -56,7 +56,7 @@ jobs: | ||
| 56 | 56 | # https://github.com/marketplace/actions/close-stale-issues |
| 57 | 57 | uses: actions/stale@v9.1.0 |
| 58 | 58 | with: |
| 59 | 59 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 60 | 60 | days-before-stale: 7 |
| 61 | 61 | days-before-close: 7 |
| 62 | 62 | operations-per-run: 30 |
| @@ -83,7 +83,7 @@ jobs: | ||
| 83 | 83 | # https://github.com/marketplace/actions/close-stale-issues |
| 84 | 84 | uses: actions/stale@v9.1.0 |
| 85 | 85 | with: |
| 86 | 86 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 87 | 87 | days-before-stale: 7 |
| 88 | 88 | days-before-close: 7 |
| 89 | 89 | operations-per-run: 30 |
| @@ -23,6 +23,6 @@ jobs: | ||
| 23 | 23 | uses: actions-cool/issues-helper@v3.6.0 |
| 24 | 24 | with: |
| 25 | 25 | actions: remove-labels |
| 26 | 26 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 27 | 27 | issue-number: ${{ github.event.issue.number || github.event.pull_request.number }} |
| 28 | 28 | labels: 'π Awaiting User Response,π§βπ» In Progress,π Keep Open,π« Merge Conflicts,π¬ Needs Testing,π¨ Needs Work,β°οΈ Stale,β Waiting For External/Upstream' |
| @@ -24,6 +24,6 @@ jobs: | ||
| 24 | 24 | uses: actions-cool/issues-helper@v3.6.0 |
| 25 | 25 | with: |
| 26 | 26 | actions: 'add-labels' |
| 27 | 27 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 28 | 28 | issue-number: ${{ github.event.issue.number || github.event.pull_request.number }} |
| 29 | 29 | labels: 'π· Maintainer' |
| @@ -14,14 +14,22 @@ jobs: | ||
| 14 | 14 | label-by-size: |
| 15 | 15 | name: π·οΈ Label PR by Size |
| 16 | 16 | runs-on: ubuntu-latest |
| 17 | + # Only needs to run when code is changed | |
| 18 | + if: github.event.action == 'opened' || github.event.action == 'synchronize' | |
| 19 | + | |
| 20 | + # Override permissions, the labeler needs issues write access | |
| 21 | + permissions: | |
| 22 | + contents: read | |
| 23 | + issues: write | |
| 24 | + pull-requests: write | |
| 17 | 25 | |
| 18 | 26 | steps: |
| 19 | 27 | - name: Label PR Size |
| 20 | 28 | # Pull Request Size Labeler |
| 21 | 29 | # https://github.com/marketplace/actions/pull-request-size-labeler |
| 22 | 30 | uses: codelytv/pr-size-labeler@v1.10.12 |
| 23 | 31 | with: |
| 24 | 32 | GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 25 | 33 | xs_label: 'π© ⬀ββββ' |
| 26 | 34 | xs_max_size: '20' |
| 27 | 35 | s_label: 'π© ⬀⬀βββ' |
| @@ -32,7 +40,6 @@ jobs: | ||
| 32 | 40 | l_max_size: '1000' |
| 33 | 41 | xl_label: 'π₯ ⬀⬀⬀⬀⬀' |
| 34 | 42 | fail_if_xl: 'false' |
| 35 | - github_api_url: 'https://api.github.com' | |
| 36 | 43 | files_to_ignore: | |
| 37 | 44 | "package-lock.json" |
| 38 | 45 | "public/lib/*" |
| @@ -40,8 +47,8 @@ jobs: | ||
| 40 | 47 | label-by-branches: |
| 41 | 48 | name: π·οΈ Label PR by Branches |
| 42 | 49 | runs-on: ubuntu-latest |
| 43 | 50 | # Only label once when PR is created or brancheswhen arebase branch is changed, to allow manual label removal |
| 44 | 51 | if: github.event.action == 'opened' || (github.event.action == 'synchronize' && (github.event.changes.base || github.event.changes.head)) |
| 45 | 52 | |
| 46 | 53 | steps: |
| 47 | 54 | - name: Checkout Repository |
| @@ -55,11 +62,13 @@ jobs: | ||
| 55 | 62 | uses: actions/labeler@v5.0.0 |
| 56 | 63 | with: |
| 57 | 64 | configuration-path: .github/pr-auto-labels-by-branch.yml |
| 58 | 65 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 59 | 66 | |
| 60 | 67 | label-by-files: |
| 61 | 68 | name: π·οΈ Label PR by Files |
| 62 | 69 | runs-on: ubuntu-latest |
| 70 | + # Only needs to run when code is changed | |
| 71 | + if: github.event.action == 'opened' || github.event.action == 'synchronize' | |
| 63 | 72 | |
| 64 | 73 | steps: |
| 65 | 74 | - name: Checkout Repository |
| @@ -73,14 +82,20 @@ jobs: | ||
| 73 | 82 | uses: actions/labeler@v5.0.0 |
| 74 | 83 | with: |
| 75 | 84 | configuration-path: .github/pr-auto-labels-by-files.yml |
| 76 | 85 | repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 77 | 86 | |
| 78 | 87 | remove-stale-label: |
| 79 | 88 | name: ποΈ Remove Stale Label on Comment |
| 80 | 89 | runs-on: ubuntu-latest |
| 81 | 90 | # Only runs when thison iscomments not done by the github actions bot |
| 82 | 91 | if: github.event_name == 'pull_request_review_comment' && github.actor != 'github-actions[bot]' |
| 83 | 92 | |
| 93 | + # Override permissions, issue labeler needs issues write access | |
| 94 | + permissions: | |
| 95 | + contents: read | |
| 96 | + issues: write | |
| 97 | + pull-requests: write | |
| 98 | + | |
| 84 | 99 | steps: |
| 85 | 100 | - name: Remove Stale Label |
| 86 | 101 | # π€ Issues Helper |
| @@ -88,7 +103,7 @@ jobs: | ||
| 88 | 103 | uses: actions-cool/issues-helper@v3.6.0 |
| 89 | 104 | with: |
| 90 | 105 | actions: 'remove-labels' |
| 91 | 106 | token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 92 | 107 | issue-number: ${{ github.event.pull_request.number }} |
| 93 | 108 | labels: 'β°οΈ Stale' |
| 94 | 109 | |
| @@ -161,7 +176,7 @@ jobs: | ||
| 161 | 176 | uses: peaceiris/actions-label-commenter@v1.10.0 |
| 162 | 177 | with: |
| 163 | 178 | config_file: .github/pr-auto-comments.yml |
| 164 | 179 | github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 165 | 180 | |
| 166 | 181 | # This runs on merged PRs to staging, reading the PR body and directly linked issues. Check `issues-updates-on-merge.yml`:`update-linked-issues` for commit-based updates. |
| 167 | 182 | update-linked-issues: |
| @@ -182,7 +197,7 @@ jobs: | ||
| 182 | 197 | PR_NUMBER=${{ github.event.pull_request.number }} |
| 183 | 198 | REPO=${{ github.repository }} |
| 184 | 199 | API_URL="https://api.github.com/repos/$REPO/pulls/$PR_NUMBER/issues" |
| 185 | 200 | ISSUES=$(curl -s -H "Authorization: token ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}" "$API_URL" | jq -r '.[].number' | jq -R -s -c 'split("\n")[:-1]') |
| 186 | 201 | echo "linked_issues=$ISSUES" >> $GITHUB_ENV |
| 187 | 202 | |
| 188 | 203 | - name: Merge Issue Lists |
| @@ -194,7 +209,7 @@ jobs: | ||
| 194 | 209 | - name: Label Linked Issues |
| 195 | 210 | id: label_linked_issues |
| 196 | 211 | env: |
| 197 | 212 | GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 198 | 213 | run: | |
| 199 | 214 | for ISSUE in $(echo $final_issues | jq -r '.[]'); do |
| 200 | 215 | gh issue edit $ISSUE -R ${{ github.repository }} --add-label "β Done (staging)" |
| @@ -23,6 +23,6 @@ jobs: | ||
| 23 | 23 | uses: eps1lon/actions-label-merge-conflict@v3.0.3 |
| 24 | 24 | with: |
| 25 | 25 | dirtyLabel: 'π« Merge Conflicts' |
| 26 | 26 | repoToken: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} |
| 27 | 27 | commentOnDirty: > |
| 28 | 28 | β οΈ This PR has conflicts that need to be resolved before it can be merged. |