Skip to content

Instantly share code, notes, and snippets.

@malantin
Created September 13, 2022 14:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malantin/90bf37ae248d22b3a680f2d51e9c644d to your computer and use it in GitHub Desktop.
Save malantin/90bf37ae248d22b3a680f2d51e9c644d to your computer and use it in GitHub Desktop.
name: Remove old artifacts
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
age:
description: 'Age in days'
required: true
default: '7'
jobs:
remove-artifacts:
runs-on: ubuntu-latest
steps:
- name: Remove artifacts
uses: c-hive/gha-remove-artifacts@v1.2.0
with:
# Artifacts older than this will be deleted (e.g. "2 months", "1 day"). Parsed by moment.
age: "${{ inputs.age }} days"
# Access token for the repository, available under the same name in secrets.
GITHUB_TOKEN: ${{ github.token }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment