Skip to content

Commit 9ca4018

Browse files
chore:use simpe docker cmd to push
1 parent f34e6f5 commit 9ca4018

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.github/workflows/build.yaml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
env:
77
CONTEXT_PATH: .
88
DOCKER_PATH: ./Dockerfile
9-
DOCKER_REGISTRY: docker.io
109
DOCKER_REPO: teamA
1110
IMAGE_NAME: be
1211
jobs:
@@ -31,16 +30,16 @@ jobs:
3130
with:
3231

3332
images: |
34-
"${{ env.DOCKER_REGISTRY }}/${{secrets.DOCKER_USERNAME}}/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }}"
33+
"${{secrets.DOCKER_USERNAME}}/${{ env.DOCKER_REPO }}/${{ env.IMAGE_NAME }}"
3534
tags: |
3635
type=raw,value={{branch}}-sha-{{sha}}
36+
37+
- name: Docker build
38+
run: |
39+
docker build -t ${{ steps.meta.outputs.images }}:${{ steps.meta.outputs.tags }} .
40+
3741
38-
39-
- name: Build and push
40-
uses: docker/build-push-action@v4
41-
with:
42-
context: ${{ env.CONTEXT_PATH }}
43-
file: ${{ env.DOCKER_PATH }}
44-
push: ${{ github.event_name != 'pull_request' }}
45-
tags: ${{ steps.meta.outputs.tags }}
46-
labels: ${{ steps.meta.outputs.labels }}
42+
- name: Docker push
43+
run: |
44+
docker push ${{ steps.meta.outputs.images }}:${{ steps.meta.outputs.tags }}
45+

0 commit comments

Comments
 (0)