forked from mm3141/GameOverlay
-
Notifications
You must be signed in to change notification settings - Fork 19
42 lines (39 loc) · 1.28 KB
/
Copy pathdelete_old_workflow.yml
File metadata and controls
42 lines (39 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: DeleteGithubActions
on:
delete:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
workflowName:
description: 'Name of workflow to delete from'
required: true
default: 'DeleteGithubActions'
jobs:
del_runs:
runs-on: ubuntu-latest
steps:
- name: Delete workflow runs on manual trigger
if: github.event_name=='workflow_dispatch'
uses: mwigginsdev/delete-oldest-workflow-runs@main
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
keep_minimum_runs: '1'
workflow_name: ${{ github.event.inputs.workflowName }}
- name: Delete workflow runs on manual trigger
if: github.event_name=='schedule'
uses: mwigginsdev/delete-oldest-workflow-runs@main
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
keep_minimum_runs: '1'
workflow_name: 'Release'
- name: Delete workflow runs on manual trigger
if: github.event_name=='delete'
uses: mwigginsdev/delete-oldest-workflow-runs@main
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
keep_minimum_runs: '5'
workflow_name: 'PullRequest'