Skip to content

Delete old branches #75

Delete old branches

Delete old branches #75

name: Delete old branches
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
cleanup_old_branches:
runs-on: ubuntu-latest
if: github.repository == 'wolfi-dev/os'
permissions:
id-token: write # To gitsign and federate
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit
- uses: octo-sts/action@6177b4481c00308b3839969c3eca88c96a91775f # v1.0.0
id: octo-sts
with:
scope: ${{ github.repository }}
identity: delete-branches
# this need to point to main to always get the latest action
- uses: wolfi-dev/actions/install-wolfictl@main # main
- name: Delete Branches
run: |
wolfictl gh gc branch https://github.com/wolfi-dev/os --match "wolfictl-"
env:
GITHUB_TOKEN: ${{ steps.octo-sts.outputs.token }}