Skip to content

Commit

Permalink
ci: Defined GIT_COMMIT when building an image
Browse files Browse the repository at this point in the history
  • Loading branch information
geokrety-bot committed Aug 10, 2023
1 parent cc5cee4 commit e6e6efc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/actions/docker-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}

0 comments on commit e6e6efc

Please sign in to comment.