Skip to content

Commit

Permalink
更新构建流,统一docker和ghcr镜像名称
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroDeng01 committed Jun 11, 2024
1 parent b79c373 commit 2a20a02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bulid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
- name: Build Docker image
run: |
repo_name_docker_hub=$(echo "${{ vars.DOCKER_HUB_REPO }}" | tr '[:upper:]' '[:lower:]')
repo_name_ghcr=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
repo_name_ghcr=$(echo "${{ github.actor }}/${{ vars.DOCKER_HUB_REPO }}" | tr '[:upper:]' '[:lower:]')
tag_name=$(echo "${{ env.TAG_NAME }}" | tr '[:upper:]' '[:lower:]')
docker build -t docker.io/${{ vars.DOCKER_HUB_USERNAME }}/$repo_name_docker_hub:$tag_name .
docker tag docker.io/${{ vars.DOCKER_HUB_USERNAME }}/$repo_name_docker_hub:$tag_name docker.io/${{ vars.DOCKER_HUB_USERNAME }}/$repo_name_docker_hub:latest
Expand All @@ -153,7 +153,7 @@ jobs:
- name: Push to GitHub Container Registry
run: |
repo_name_ghcr=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
repo_name_ghcr=$(echo "${{ github.actor }}/${{ vars.DOCKER_HUB_REPO }}" | tr '[:upper:]' '[:lower:]')
tag_name=$(echo "${{ env.TAG_NAME }}" | tr '[:upper:]' '[:lower:]')
docker push ghcr.io/$repo_name_ghcr:$tag_name
docker push ghcr.io/$repo_name_ghcr:latest

0 comments on commit 2a20a02

Please sign in to comment.