Skip to content

Commit

Permalink
Add the release tag to the docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
shizunge authored Oct 27, 2021
1 parent 31cf50b commit 9afe79b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/docker-hub-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,14 @@ jobs:
version: latest
- name: login to docker hub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
- name: build the image
- name: build and push the latest image
run: |
docker buildx build --push \
--tag shizunge/endlessh-go:latest \
--platform linux/amd64,linux/arm/v7,linux/arm64 .
- name: extract tag string
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: tag image
run: docker tag shizunge/endlessh-go:latest shizunge/endlessh-go:$RELEASE_VERSION
- name: push tagged image
run: docker push shizunge/endlessh-go:$RELEASE_VERSION

0 comments on commit 9afe79b

Please sign in to comment.