forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.3 KB
/
prune-branches.yml
File metadata and controls
46 lines (43 loc) · 1.3 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: Prune Unused Branches
permissions:
contents: read
on:
pull_request:
paths:
- .github/workflows/prune-branches.yml
- .github/workflows/prune-unused-branches.py
schedule:
- cron: '0 8 * * *' # Runs daily at 08:00 UTC.
jobs:
prune-branches:
name: Prune Branches
if: github.repository_owner == 'llvm'
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Fetch LLVM sources
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Install dependencies
run: |
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
- name: Run Script
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir patches
python3 .github/workflows/prune-unused-branches.py .
- name: Upload Patches
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: BranchDiffs
retention-days: 90
path: patches/*.patch
- name: Upload Branch List
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: BranchList
retention-days: 90
path: branches.txt