Skip to content

Prune Unused Branches #16

Prune Unused Branches

Prune Unused Branches #16

name: Prune Unused Branches
permissions:
contents: read
on:
pull_request:
paths:
- .github/workflows/prune-branches.yml
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 patches/
- name: Upload Patches
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: BranchDiffs
retention-days: 90
path: patches/*.patch