diff --git a/.github/workflows/resultsdb.yaml b/.github/workflows/resultsdb.yaml index ddb0b89..b878b16 100644 --- a/.github/workflows/resultsdb.yaml +++ b/.github/workflows/resultsdb.yaml @@ -132,6 +132,7 @@ jobs: containerfiles: Dockerfile build-args: | GITHUB_SHA=${{ github.sha }} + EXPIRES_AFTER=${{ github.ref == 'refs/heads/develop' && 'never' || '30d' }} - name: Log in to the image registry if: github.event_name == 'push' && github.actor != 'dependabot[bot]' diff --git a/Dockerfile b/Dockerfile index 021bfca..7909459 100644 --- a/Dockerfile +++ b/Dockerfile @@ -73,6 +73,7 @@ RUN sed -i 's#^WSGISocketPrefix .*#WSGISocketPrefix /tmp/wsgi#' conf/resultsdb.c # --- Final image FROM scratch ARG GITHUB_SHA +ARG EXPIRES_AFTER LABEL \ name="ResultsDB application" \ vendor="ResultsDB developers" \ @@ -82,7 +83,8 @@ LABEL \ url="https://github.com/release-engineering/resultsdb" \ vcs-type="git" \ vcs-ref=$GITHUB_SHA \ - io.k8s.display-name="ResultsDB" + io.k8s.display-name="ResultsDB" \ + quay.expires-after=$EXPIRES_AFTER ENV \ PYTHONFAULTHANDLER=1 \