forked from hyperlight-dev/hyperlight
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (29 loc) · 1.09 KB
/
CleanUpReleasesAndPackages.yml
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# This job cleans up old pre-releases and pre-releases packages retaining the last 40 versions
name: Clean up old pre-releases and packages and artifacts
on:
schedule:
- cron: "0 8 * * 1" # run at 8am every Monday
workflow_dispatch: # allow manual triggering
jobs:
cleanup:
name: Clean up old pre-releases and packages
runs-on: ubuntu-latest
permissions:
actions: write # required for reading & deleting github actions artifacts
contents: write # required for reading and deleting releases
steps:
- name: Delete old 'Hyperlight' releases
uses: sgpublic/[email protected]
with:
pre-release-drop: true
pre-release-keep-count: 5
pre-release-drop-tag: true
draft-drop: false
env:
GITHUB_TOKEN: ${{ github.token }}
- uses: actions/checkout@v4
- name: Delete old Github Actions Artifacts
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./dev/clean-github-artifacts.sh