fix: use shell docker login instead of action
Build and Deploy / build-and-push (push) Successful in 12s
Build and Deploy / deploy (push) Failing after 0s

This commit is contained in:
2026-07-21 21:24:45 +08:00
parent 0d2291dceb
commit 210fea2195
+5 -12
View File
@@ -41,20 +41,13 @@ jobs:
run: pnpm build run: pnpm build
- name: Login to Registry - name: Login to Registry
uses: docker/login-action@v3 run: echo "${{ secrets.TOKEN }}" | docker login ${{ env.REGISTRY }} -u admin --password-stdin
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.TOKEN }}
password: ${{ secrets.TOKEN }}
- name: Build and push Docker image - name: Build and push Docker image
uses: docker/build-push-action@v5 run: |
with: docker build -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest -t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} .
context: . docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
push: true docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}
deploy: deploy:
needs: build-and-push needs: build-and-push