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