You've already forked armbian.github.io
mirror of
https://github.com/armbian/armbian.github.io.git
synced 2026-01-06 11:42:20 -08:00
Add workflow cleaning action
This commit is contained in:
28
.github/workflows/clean-workflow-logs.yml
vendored
Normal file
28
.github/workflows/clean-workflow-logs.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Clean Workflow Logs
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * 2" # Runs "At 00:00 on Tuesday." (see https://crontab.guru)
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
runs_older_than:
|
||||
description: "The amount of days old to delete"
|
||||
default: "21"
|
||||
required: false
|
||||
|
||||
env:
|
||||
SCHEDULED_RUNS_OLDER_THAN: "21"
|
||||
SCHEDULED_RUNS_TO_KEEP: "0"
|
||||
|
||||
jobs:
|
||||
clean-logs:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write
|
||||
steps:
|
||||
- uses: igorjs/gh-actions-clean-workflow@v6
|
||||
with:
|
||||
runs_older_than: ${{ github.event.inputs.runs_older_than || env.SCHEDULED_RUNS_OLDER_THAN }}
|
||||
runs_to_keep: ${{ github.event.inputs.runs_to_keep || env.SCHEDULED_RUNS_TO_KEEP }}
|
||||
|
||||
Reference in New Issue
Block a user