Skip to content

Commit

Permalink
Add image expiration for branches (release-engineering#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Feb 22, 2024
1 parent 75c86a4 commit 459f7d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/gating.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ jobs:
containerfiles: Dockerfile
build-args: |
GITHUB_SHA=${{ github.sha }}
EXPIRES_AFTER=${{ github.ref == 'refs/heads/master' && 'never' || '30d' }}
- name: Log in to the image registry
if: github.event_name == 'push' && github.actor != 'dependabot[bot]'
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ RUN set -ex \
# --- Final image
FROM scratch
ARG GITHUB_SHA
ARG EXPIRES_AFTER
LABEL \
summary="Greenwave application" \
description="Decision-making service for gating in a software delivery pipeline." \
Expand All @@ -60,7 +61,8 @@ LABEL \
url="https://github.com/release-engineering/greenwave" \
vcs-type="git" \
vcs-ref=$GITHUB_SHA \
io.k8s.display-name="Greenwave"
io.k8s.display-name="Greenwave" \
quay.expires-after=$EXPIRES_AFTER

ENV \
PYTHONFAULTHANDLER=1 \
Expand Down

0 comments on commit 459f7d2

Please sign in to comment.