Skip to content

Commit ef69cfb

Browse files
committed
Delete untagged images
1 parent 42ed476 commit ef69cfb

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

Diff for: .github/workflows/nightly-alpine.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,20 @@ jobs:
6565
RELEASE_QUERY_API=${{ env.RELEASE_QUERY_API }}
6666
tags: |
6767
ghcr.io/nushell/nushell:${{ env.NU_VERSION }}
68+
69+
cleanup:
70+
runs-on: ubuntu-latest
71+
permissions:
72+
contents: read
73+
packages: write
74+
needs: build-and-push-Nu
75+
steps:
76+
- name: Delete all containers from repository without tags
77+
uses: Chizkiyahu/delete-untagged-ghcr-action@v4
78+
with:
79+
owner_type: user
80+
untagged_only: true
81+
package_name: 'nushell'
82+
repository_owner: 'nushell'
83+
repository: 'nushell/nushell'
84+
token: ${{ secrets.GITHUB_TOKEN }}

Diff for: .github/workflows/release-nu-image.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,20 @@ jobs:
9393
ghcr.io/nushell/nushell:latest-alpine
9494
ghcr.io/nushell/nushell:${{ env.NU_VERSION }}
9595
ghcr.io/nushell/nushell:${{ env.NU_VERSION }}-alpine
96+
97+
cleanup:
98+
runs-on: ubuntu-latest
99+
permissions:
100+
contents: read
101+
packages: write
102+
needs: build-and-push-Nu
103+
steps:
104+
- name: Delete all containers from repository without tags
105+
uses: Chizkiyahu/delete-untagged-ghcr-action@v4
106+
with:
107+
owner_type: user
108+
untagged_only: true
109+
package_name: 'nushell'
110+
repository_owner: 'nushell'
111+
repository: 'nushell/nushell'
112+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)