From 2dc7b89b09ea9b097757a8bbe8e3c1fcb7628175 Mon Sep 17 00:00:00 2001 From: Jonathan Gramain Date: Thu, 23 Mar 2023 15:14:36 -0700 Subject: [PATCH] impr: RELENG-7322 docker-build: add git repo labels Add the labels 'git.commit-sha' and 'git.repository' to images built using the docker-build workflow, which values are the git repository name (e.g. "scality/cloudserver") and the git commit SHA used to build the image. The immediate need is for Integration to tell which commit hash to pull Cloudserver tests from (INTGR-907). --- .github/workflows/docker-build.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 5ffc1fb..3b7dd32 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -15,6 +15,12 @@ on: required: false type: string default: "${{ github.sha }}" + labels: + required: false + type: string + default: | + git.repository=${{ github.repository }} + git.commit-sha=${{ github.sha }} registry: required: false type: string @@ -81,6 +87,7 @@ jobs: provenance: ${{ inputs.provenance }} push: ${{ inputs.push }} tags: ${{ inputs.registry }}/${{ inputs.namespace }}/${{ inputs.name }}:${{ inputs.tag }} + labels: ${{ inputs.labels }} cache-from: type=gha,scope=${{ inputs.name }} cache-to: type=gha,mode=max,scope=${{ inputs.name }} no-cache: ${{ inputs.no-cache }}