Skip to content

Commit

Permalink
Add package cleanup action (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick authored Mar 12, 2024
1 parent a33332c commit 0e26a09
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/cleanup-packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 👋 🦭🗑️
on:
workflow_dispatch:
inputs:
keep-latest-items:
description: 'Keep n items from latest'
required: true
default: 2
type: number

jobs:
ghcr:
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- uses: actions/delete-package-versions@e5bc658cc4c965c472efe991f8beea3981499c55 # v5.0.0
with:
owner: ${{ github.repository_owner }}
package-name: 'home'
package-type: 'container'
token: ${{ github.token }}
min-versions-to-keep: ${{ inputs.keep-latest-items }}
4 changes: 2 additions & 2 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
crun --version
- uses: actions/checkout@v4
- name: Build Image
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 #v2.13
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2.13
with:
image: systemd-prepared
containerfiles: |
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
- name: Push To ghcr.io
id: push-to-ghcr
if: ${{ github.event_name != 'pull_request' }}
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c #v2.8
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2.8
with:
image: home
tags: latest ${{ github.sha }} ${{ needs.get-meta.outputs.started_at }}
Expand Down

0 comments on commit 0e26a09

Please sign in to comment.