Skip to content

Clean up old pre-releases and packages and artifacts #3

Clean up old pre-releases and packages and artifacts

Clean up old pre-releases and packages and artifacts #3

# 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