Docker tag latest #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Tag Latest | |
on: | |
# push: | |
# branches: | |
# - main | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel. | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Tag latest image | |
run: | | |
RELEASE_VERSION=${GITHUB_REF_NAME#release/} | |
docker tag bytebase/bytebase:${RELEASE_VERSION} bytebase/bytebase:latest | |
docker push bytebase/bytebase:latest |