-
Notifications
You must be signed in to change notification settings - Fork 216
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Evan Baker <[email protected]>
- Loading branch information
Showing
2 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Container Registry Cleanup | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # every day at midnight | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
container-cleanup: | ||
name: delete-images | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
image: | ||
- "retina/charts/retina" | ||
- "retina/kubectl-retina" | ||
- "retina/retina-agent" | ||
- "retina/retina-init" | ||
- "retina/retina-operator" | ||
steps: | ||
# This is a fork of the official actions/delete-package-versions which adds GHCR image tag support | ||
# https://github.com/actions/delete-package-versions/pull/104 | ||
- uses: port-of-rotterdam-dtis/delete-package-versions@bf25fb8df311fdcbeac67ba2e5153495d76415a8 | ||
with: | ||
package-name: ${{ matrix.image }} | ||
package-type: "container" | ||
min-versions-to-keep: 0 | ||
ignore-versions: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(\\.*)$" | ||
ignore-versions-include-tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ name: Release Retina Charts | |
|
||
on: | ||
push: | ||
branches: [main] | ||
tags: ["v*"] | ||
|
||
permissions: | ||
|
@@ -25,15 +24,15 @@ jobs: | |
|
||
- uses: azure/[email protected] | ||
id: install | ||
|
||
- name: Install Cosign | ||
uses: sigstore/[email protected] | ||
|
||
- name: Log in to registry (Helm for pushing chart, Docker for signing and push signature) | ||
run: | | ||
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u $ --password-stdin | ||
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | ||
- name: Build, Push and Sign chart | ||
id: build_chart | ||
shell: bash | ||
|
@@ -45,4 +44,3 @@ jobs: | |
helm push retina-$TAG.tgz oci://ghcr.io/${{ github.repository }}/charts >> helm_push_result.txt 2>&1 | ||
cat helm_push_result.txt | ||
cosign sign --yes ghcr.io/${{ github.repository }}/charts/retina@$(tail -n 1 helm_push_result.txt | awk '{ print $2 }') | ||