diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 414feaffc..5f6a074e5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,13 +44,15 @@ jobs: repo="http://110.16.193.170:50083/repository/pypi-hosted/" twine upload --verbose -u ${{ secrets.NEXUS_USER }} -p ${{ secrets.NEXUS_PASSWORD }} --repository-url $repo dist/*.whl - # 发布到私服 + # 发布到 - name: Login - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: - registry: "http://110.16.193.170:50083/repository/docker-hosted/" - username: ${{ secrets.NEXUS_USER }} - password: ${{ secrets.NEXUS_PASSWORD }} + # GitHub Repo => Settings => Secrets 增加 docker hub 登录密钥信息 + # DOCKERHUB_USERNAME 是 docker hub 账号名. + # DOCKERHUB_TOKEN: docker hub => Account Setting => Security 创建. + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} # 构建 backend 并推送到 Docker hub - name: Build backend and push id: docker_build_backend @@ -63,11 +65,10 @@ jobs: # docker build arg, 注入 APP_NAME/APP_VERSION build-args: | APP_NAME="bisheng-backend" - APP_VERSION=0.1 + APP_VERSION="release" # 生成两个 docker tag: ${APP_VERSION} 和 latest tags: | - ${{ env.DOCKERHUB_REPO }}bisheng-backend:latest - ${{ env.DOCKERHUB_REPO }}bisheng-backend:0.1 + ${{ env.DOCKERHUB_REPO }}bisheng-backend:release # 构建 Docker frontend 并推送到 Docker hub - name: Build frontend and push id: docker_build_frontend @@ -80,10 +81,9 @@ jobs: # docker build arg, 注入 APP_NAME/APP_VERSION build-args: | APP_NAME="bisheng-frontend" - APP_VERSION=0.1 + APP_VERSION="release" # 生成两个 docker tag: ${APP_VERSION} 和 latest tags: | - ${{ env.DOCKERHUB_REPO }}bisheng-frontend:latest - ${{ env.DOCKERHUB_REPO }}bisheng-frontend:0.1 + ${{ env.DOCKERHUB_REPO }}bisheng-frontend:release \ No newline at end of file