Skip to content

Commit

Permalink
optimize docker image version (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzhenghao authored Dec 14, 2021
1 parent 2c95589 commit d7d9d35
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
platforms: linux/amd64,linux/arm64
file: docker/${{ matrix.image }}/Dockerfile
push: true
tags: zhenghaoz/${{ matrix.image }}:latest
tags: zhenghaoz/${{ matrix.image }}:nightly
11 changes: 7 additions & 4 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,17 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- uses: olegtarasov/[email protected]
id: tag_name
- id: get_version
uses: battila7/get-version-action@v2

- name: Build docker image
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
file: docker/${{ matrix.image }}/Dockerfile
push: true
tags: zhenghaoz/${{ matrix.image }}:${{ steps.tag_name.outputs.tag }}
tags: |
zhenghaoz/${{ matrix.image }}:latest
zhenghaoz/${{ matrix.image }}:${{ steps.get_version.outputs.major }}.${{ steps.get_version.outputs.minor }}
zhenghaoz/${{ matrix.image }}:${{ steps.get_version.outputs.version-without-v }}

0 comments on commit d7d9d35

Please sign in to comment.