From a1e15e34328f9c8c440ccff76a1a0f9c33927376 Mon Sep 17 00:00:00 2001 From: Juha Ristolainen Date: Fri, 21 Jul 2023 12:14:09 +0200 Subject: [PATCH] More metadata in the Dockerfile. --- .github/workflows/docker-image.yml | 4 +++- Dockerfile | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 95608d7..d1abc04 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -35,7 +35,9 @@ jobs: with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} tags: | - type=schedule + # set latest tag for main branch + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=schedule,pattern={{date 'YYYYMMDD-hhmmss' tz='Europe/Berlin'}} type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} diff --git a/Dockerfile b/Dockerfile index 00e031a..70f2db8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,10 @@ FROM golang:1.20.6-bookworm ######################################## # METADATA LABEL author="Juha Ristolainen " +LABEL org.opencontainers.image.vendor="Juha Ristolainen" +LABEL org.opencontainers.image.source="https://github.com/riussi/docker-build-image-go" +LABEL org.opencontainers.image.description="My personal Go builder-image" +LABEL org.opencontainers.image.licenses="Apache 2.0" ######################################## # ARGUMENTS @@ -11,7 +15,6 @@ ARG USER=dev ######################################## # ENVIRONMENT -# GITHUB_TOKEN, GITLAB_TOKEN and GITEA_TOKEN ENV DEBIAN_FRONTEND "noninteractive" ENV HOME /home/${USER} ENV GOLANGCILINT_VERSION 1.53.3