Skip to content

Commit

Permalink
add cleanup job
Browse files Browse the repository at this point in the history
  • Loading branch information
anaelorlinski committed May 7, 2021
1 parent 94fe59e commit ede144f
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Cleaning

on:
#schedule:
# - cron: 1 8 * * 1
# watch:
# types: started
workflow_dispatch:

jobs:
#Cleanup-Old-Releases:
# runs-on: ubuntu-20.04
# if: github.event.repository.owner.id == github.event.sender.id
# steps:
# - name: Delete Older Releases
# uses: dev-drprasad/delete-older-releases@master
# with:
# keep_latest: 4
# delete_tags: true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Cleanup-Old-Artifacts:
runs-on: ubuntu-20.04
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Cleanup Old Action Artifacts
uses: kolpav/purge-artifacts-action@master
with:
token: ${{ github.token }}
expire-in: 3d

Cleanup-Workflow-Logs:
runs-on: ubuntu-20.04
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Cleanup Workflow Logs
uses: Mattraks/delete-workflow-runs@main
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 3

0 comments on commit ede144f

Please sign in to comment.