Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.02 KB

README.md

File metadata and controls

30 lines (24 loc) · 1.02 KB

build-test

Purge old workflow runs from GitHub Actions

When using GitHub Actions with a lot of different actions and workflows, you'll soon face the issue of deprecated and unused workflows piling up in your Actions tab.

This action aims to clean out those outdated workflows by removing old runs.

You can decide to ignore runs related to open Pull Requests by using ignore-open-pull-requests: true, as shown in the below example.

Usage example

name: Cleanup Workflow Runs
on:
  workflow_dispatch:
  schedule:
    - cron: '0 0 * * *'
jobs:
  cleanup:
    runs-on: ubuntu-latest
    steps:
      - name: Cleanup workflow runs
        uses: iamludal/action-purge-workflow-runs@v2
        with:
          days-old: 30
          ignore-open-pull-requests: true
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}