generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 187
46 lines (38 loc) · 1.15 KB
/
close-stale.yml
File metadata and controls
46 lines (38 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Close Stale Issues
on:
schedule:
# Run daily at midnight UTC
- cron: "0 0 * * *"
workflow_dispatch: # Allow manual trigger
permissions:
issues: write
contents: read
jobs:
close-stale:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
working-directory: scripts
run: npm install
- name: Build TypeScript
working-directory: scripts
run: npm run build
- name: Close stale issues
working-directory: scripts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPOSITORY_OWNER: ${{ github.repository_owner }}
REPOSITORY_NAME: ${{ github.event.repository.name }}
run: node dist/close_stale.js
- name: Create workflow summary
if: always()
run: |
echo "## Stale Issue Closer Summary" >> $GITHUB_STEP_SUMMARY
echo "Status: ${{ job.status }}" >> $GITHUB_STEP_SUMMARY
echo "Run time: $(date)" >> $GITHUB_STEP_SUMMARY