@@ -18,14 +18,10 @@ name: stale repo identifier
1818 workflow_dispatch :
1919 push :
2020 branches :
21- - main
21+ - fix-stale-repos-action
2222 schedule :
2323 - cron : " 0 1 1 * *" # Runs monthly: at 01:00 UTC on the 1st day of every month
2424
25- permissions :
26- contents : read
27- issues : write
28-
2925jobs :
3026 build :
3127 name : Stale repo identifier
@@ -38,10 +34,10 @@ jobs:
3834 contents : read
3935
4036 steps :
41- - uses : actions/checkout@v4
37+ - uses : actions/checkout@v6
4238
4339 - name : Run stale_repos tool
44- uses : github/stale-repos@v2.1 .3
40+ uses : github/stale-repos@v8.0 .3
4541 env :
4642 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4743 ORGANIZATION : SovereignCloudStack
5349 run : mv stale_repos.md stale_repos_${{ matrix.days }}.md
5450
5551 - name : Upload stale report artifact
56- uses : actions/upload-artifact@v4
52+ uses : actions/upload-artifact@v5
5753 with :
5854 name : stale_repos_report_${{ matrix.days }}
5955 path : stale_repos_${{ matrix.days }}.md
@@ -64,35 +60,40 @@ jobs:
6460 needs : build # Runs after all matrix jobs finish
6561
6662 permissions :
63+ contents : write
6764 issues : write
6865
6966 steps :
70- - uses : actions/checkout@v4
67+ - uses : actions/checkout@v6
7168
7269 - name : Download all stale report artifacts
73- uses : actions/download-artifact@v4
70+ uses : actions/download-artifact@v6
7471 with :
7572 path : stale_reports
7673
7774 - name : Merge reports
7875 run : |
79- echo "# Stale Repository Report" > final_stale_repos.md
76+ echo "# Autogenerated Stale Repository Report " > final_stale_repos.md
77+ echo "### Do not close this issue - is is autogenerated by the `stale repo identifier` action" > final_stale_repos.md
8078 for file in stale_reports/**/stale_repos_*.md; do
8179 cat "$file" >> final_stale_repos.md
8280 echo "" >> final_stale_repos.md
8381 done
8482
8583 - name : Check for the stale report issue
8684 run : |
87- ISSUE_NUMBER=$(gh search issues "Stale repository report " --match title --json number --jq ".[0].number")
85+ ISSUE_NUMBER=$(gh search issues "Autogenerated Stale Repository Report (DO NOT CLOSE) " --match title --json number --jq ".[0].number")
8886 echo "issue_number=$ISSUE_NUMBER" >> "$GITHUB_ENV"
8987 env :
9088 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9189
9290 - name : Create or update issue
93- uses : peter-evans/create-issue-from-file@v5
91+ uses : peter-evans/create-issue-from-file@v6
9492 with :
9593 issue-number : ${{ env.issue_number }}
9694 title : Stale repository report
9795 content-filepath : ./final_stale_repos.md
98- token : ${{ secrets.GITHUB_TOKEN }}
96+ # FIXME: GITHUB_TOKEN does not work on forks (including this repo).
97+ # See: https://github.com/peter-evans/create-issue-from-file/issues/1673
98+ # Remove the current PAT workaround and implement a better solution.
99+ token : ${{ secrets.STALE_PAT }}
0 commit comments