Repository navigation
Cleanup Non-DevSecOps Branches #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Cleanup Non-DevSecOps Branches | |
| on: | |
| schedule: | |
| - cron: '0 0 * * 0' # Run weekly on Sunday at 00:00 | |
| workflow_dispatch: | |
| permissions: {} | |
| jobs: | |
| cleanup: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run safety unit tests | |
| run: | | |
| chmod +x scripts/cleanup-branches.sh scripts/cleanup-branches_test.sh | |
| ./scripts/cleanup-branches_test.sh | |
| - name: Cleanup invalid branches | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| ./scripts/cleanup-branches.sh |