Skip to content

Latest commit

 

History

History
42 lines (29 loc) · 895 Bytes

README.md

File metadata and controls

42 lines (29 loc) · 895 Bytes

Clean Workflow Action

Clean workflow run logs based on configuration

Usage

Parameters

  • token: The token to use to access the GitHub API (required)

  • days_old: The amount of days old to delete (default: 7)

Outputs

  • result: The number of workflows deleted

Example

name: Clean Workflow Logs

on:
  workflow_dispatch:
    inputs:
      days_old:
        description: "The amount of days old to delete"
        default: "7"
        required: false

jobs:
  clean-logs:
    runs-on: ubuntu-latest
    steps:
      - uses: igorjs/gh-actions-clean-workflow@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          days_old: ${{ github.event.inputs.days_old }}

Known issues

  1. The routine only deletes 100 workflows per run. There's an ongoing work to address this issue.