miha42-github executed prune-branches action #60
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: prune-branches | |
| run-name: ${{ github.actor }} executed prune-branches action | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Runs at midnight every day | |
| workflow_dispatch: # Allows manual execution | |
| jobs: | |
| prune-branches: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: npm install | |
| working-directory: ./.github/actions/prune-branches | |
| - name: Prune stale branches | |
| uses: ./.github/actions/prune-branches | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |