From e6e6efc8e168e187c87d13c041a169d156e1400c Mon Sep 17 00:00:00 2001 From: geokrety-bot Date: Thu, 10 Aug 2023 09:48:34 +0200 Subject: [PATCH] ci: Defined GIT_COMMIT when building an image --- .github/actions/docker-build/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions/docker-build/action.yml b/.github/actions/docker-build/action.yml index 2b9f18b..7ef1ceb 100644 --- a/.github/actions/docker-build/action.yml +++ b/.github/actions/docker-build/action.yml @@ -54,6 +54,11 @@ runs: username: ${{ inputs.dockerhub_username }} password: ${{ inputs.dockerhub_token }} + - name: Set output + id: vars + run: | + echo "GIT_COMMIT=$(git describe --tags)" >> $GITHUB_OUTPUT + - name: Build and push uses: docker/build-push-action@v4 with: @@ -62,3 +67,4 @@ runs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + build-args: GIT_COMMIT=${{ steps.vars.outputs.GIT_COMMIT }}