Merge pull request #3719 from SillyTavern/fix-workflows-v2-v1.1 Fixing GitHub Workflows - again (maybe this time it works)

909c7f1037ffb616f61f312bc37a6c12024f7d24

Wolfsblvt <wolfsblvt@gmail.com>

Signed
9 files changed, +49 -28Ignore whitespace
.github/issues-auto-labels.yml+2 -2
@@ -14,7 +14,7 @@
14 - '(🐧 Linux)'14 - '(🐧 Linux)'
1515
16🦊 Firefox:16🦊 Firefox:
17 - '(firefox|mozilla)'17 - '\b(firefox|mozilla)\b'
1818
19πŸ“± Mobile:19πŸ“± Mobile:
20 - '(iphone|ios|android|πŸ“± Termux)'20 - '\b(iphone|ios|android|πŸ“± Termux)\b'
.github/pr-auto-labels-by-branch.yml+6 -0
@@ -34,6 +34,9 @@
34🦊 Firefox:34🦊 Firefox:
35- head-branch: ['\bfirefox\b']35- head-branch: ['\bfirefox\b']
3636
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']
3942
@@ -58,6 +61,9 @@
58πŸ“œ Prompt:61πŸ“œ Prompt:
59- head-branch: ['\bprompt\b']62- head-branch: ['\bprompt\b']
6063
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']
6369
.github/workflows/issues-auto-manager.yml+7 -7
@@ -32,7 +32,7 @@ jobs:
32 with:32 with:
33 configuration-path: .github/issues-auto-labels.yml33 configuration-path: .github/issues-auto-labels.yml
34 enable-versioned-regex: 034 enable-versioned-regex: 0
35 repo-token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}35 repo-token: ${{ secrets.GITHUB_TOKEN }}
3636
37 label-on-labels:37 label-on-labels:
38 name: 🏷️ Label Issues by Labels38 name: 🏷️ Label Issues by Labels
@@ -46,7 +46,7 @@ jobs:
46 uses: actions-cool/issues-helper@v3.6.046 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'
5151
52 - name: ❌ Remove progress labels when issue is marked done or stale52 - name: ❌ Remove progress labels when issue is marked done or stale
@@ -56,7 +56,7 @@ jobs:
56 uses: actions-cool/issues-helper@v3.6.056 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'
6161
62 - name: ❌ Remove temporary labels when confirmed labels are added62 - name: ❌ Remove temporary labels when confirmed labels are added
@@ -66,7 +66,7 @@ jobs:
66 uses: actions-cool/issues-helper@v3.6.066 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'
7171
72 - name: ❌ Remove no bug labels when "πŸͺ² Confirmed" is added72 - name: ❌ Remove no bug labels when "πŸͺ² Confirmed" is added
@@ -76,7 +76,7 @@ jobs:
76 uses: actions-cool/issues-helper@v3.6.076 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'
8181
82 remove-stale-label:82 remove-stale-label:
@@ -92,7 +92,7 @@ jobs:
92 uses: actions-cool/issues-helper@v3.6.092 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'
9898
@@ -113,4 +113,4 @@ jobs:
113 uses: peaceiris/actions-label-commenter@v1.10.0113 uses: peaceiris/actions-label-commenter@v1.10.0
114 with:114 with:
115 config_file: .github/issues-auto-comments.yml115 config_file: .github/issues-auto-comments.yml
116 github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}116 github_token: ${{ secrets.GITHUB_TOKEN }}
.github/workflows/issues-updates-on-merge.yml+1 -1
@@ -31,7 +31,7 @@ jobs:
31 - name: Label Linked Issues31 - name: Label Linked Issues
32 id: label_linked_issues32 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 '.[]'); do36 for ISSUE in $(echo $issues | jq -r '.[]'); do
37 if [ "${{ github.ref }}" == "refs/heads/staging" ]; then37 if [ "${{ github.ref }}" == "refs/heads/staging" ]; then
.github/workflows/job-close-stale.yml+3 -3
@@ -22,7 +22,7 @@ jobs:
22 # https://github.com/marketplace/actions/close-stale-issues22 # https://github.com/marketplace/actions/close-stale-issues
23 uses: actions/stale@v9.1.023 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: 18326 days-before-stale: 183
27 days-before-close: 727 days-before-close: 7
28 operations-per-run: 3028 operations-per-run: 30
@@ -56,7 +56,7 @@ jobs:
56 # https://github.com/marketplace/actions/close-stale-issues56 # https://github.com/marketplace/actions/close-stale-issues
57 uses: actions/stale@v9.1.057 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: 760 days-before-stale: 7
61 days-before-close: 761 days-before-close: 7
62 operations-per-run: 3062 operations-per-run: 30
@@ -83,7 +83,7 @@ jobs:
83 # https://github.com/marketplace/actions/close-stale-issues83 # https://github.com/marketplace/actions/close-stale-issues
84 uses: actions/stale@v9.1.084 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: 787 days-before-stale: 7
88 days-before-close: 788 days-before-close: 7
89 operations-per-run: 3089 operations-per-run: 30
.github/workflows/on-close-handler.yml+1 -1
@@ -23,6 +23,6 @@ jobs:
23 uses: actions-cool/issues-helper@v3.6.023 uses: actions-cool/issues-helper@v3.6.0
24 with:24 with:
25 actions: remove-labels25 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'
.github/workflows/on-open-handler.yml+1 -1
@@ -24,6 +24,6 @@ jobs:
24 uses: actions-cool/issues-helper@v3.6.024 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'
.github/workflows/pr-auto-manager.yml+27 -12
@@ -14,14 +14,22 @@ jobs:
14 label-by-size:14 label-by-size:
15 name: 🏷️ Label PR by Size15 name: 🏷️ Label PR by Size
16 runs-on: ubuntu-latest16 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
1725
18 steps:26 steps:
19 - name: Label PR Size27 - name: Label PR Size
20 # Pull Request Size Labeler28 # Pull Request Size Labeler
21 # https://github.com/marketplace/actions/pull-request-size-labeler29 # https://github.com/marketplace/actions/pull-request-size-labeler
22 uses: codelytv/pr-size-labeler@v1.10.130 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 Branches48 name: 🏷️ Label PR by Branches
42 runs-on: ubuntu-latest49 runs-on: ubuntu-latest
43 # Only label once when PR is created or branches are changed, to allow manual label removal50 # 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)
4552
46 steps:53 steps:
47 - name: Checkout Repository54 - name: Checkout Repository
@@ -55,11 +62,13 @@ jobs:
55 uses: actions/labeler@v5.0.062 uses: actions/labeler@v5.0.0
56 with:63 with:
57 configuration-path: .github/pr-auto-labels-by-branch.yml64 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 }}
5966
60 label-by-files:67 label-by-files:
61 name: 🏷️ Label PR by Files68 name: 🏷️ Label PR by Files
62 runs-on: ubuntu-latest69 runs-on: ubuntu-latest
70 # Only needs to run when code is changed
71 if: github.event.action == 'opened' || github.event.action == 'synchronize'
6372
64 steps:73 steps:
65 - name: Checkout Repository74 - name: Checkout Repository
@@ -73,14 +82,20 @@ jobs:
73 uses: actions/labeler@v5.0.082 uses: actions/labeler@v5.0.0
74 with:83 with:
75 configuration-path: .github/pr-auto-labels-by-files.yml84 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 }}
7786
78 remove-stale-label:87 remove-stale-label:
79 name: πŸ—‘οΈ Remove Stale Label on Comment88 name: πŸ—‘οΈ Remove Stale Label on Comment
80 runs-on: ubuntu-latest89 runs-on: ubuntu-latest
81 # Only runs when this is not done by the github actions bot90 # 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]'
8392
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 Label100 - name: Remove Stale Label
86 # πŸ€– Issues Helper101 # πŸ€– Issues Helper
@@ -88,7 +103,7 @@ jobs:
88 uses: actions-cool/issues-helper@v3.6.0103 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'
94109
@@ -161,7 +176,7 @@ jobs:
161 uses: peaceiris/actions-label-commenter@v1.10.0176 uses: peaceiris/actions-label-commenter@v1.10.0
162 with:177 with:
163 config_file: .github/pr-auto-comments.yml178 config_file: .github/pr-auto-comments.yml
164 github_token: ${{ secrets.BOT_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}179 github_token: ${{ secrets.GITHUB_TOKEN }}
165180
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_ENV201 echo "linked_issues=$ISSUES" >> $GITHUB_ENV
187202
188 - name: Merge Issue Lists203 - name: Merge Issue Lists
@@ -194,7 +209,7 @@ jobs:
194 - name: Label Linked Issues209 - name: Label Linked Issues
195 id: label_linked_issues210 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 '.[]'); do214 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)"
.github/workflows/pr-check-merge-conflicts.yaml+1 -1
@@ -23,6 +23,6 @@ jobs:
23 uses: eps1lon/actions-label-merge-conflict@v3.0.323 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.