Skip to content

Commit f5c6191

Browse files
committed
ci: use build push action to publish docker image
1 parent c0c2aa2 commit f5c6191

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ jobs:
9898
- name: Checkout repository
9999
uses: actions/checkout@v3
100100

101+
- name: Set up Docker Buildx
102+
uses: docker/setup-buildx-action@v2
103+
101104
- name: Login to DockerHub
102105
uses: docker/login-action@v2
103106
with:
@@ -129,7 +132,7 @@ jobs:
129132
uses: docker/build-push-action@v3
130133
with:
131134
context: .
132-
# platforms: linux/amd64,linux/arm64
135+
load: true
133136
tags: ${{ steps.meta.outputs.tags }}
134137
labels: ${{ steps.meta.outputs.labels }}
135138

@@ -140,9 +143,9 @@ jobs:
140143
docker run --rm -i -v ${PWD}:/docs ${{ github.event.repository.full_name }}:${{ steps.meta.outputs.version }} build
141144
142145
- name: Publish Docker image
143-
env:
144-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
145-
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
146-
run: |
147-
docker push --all-tags ${{ github.event.repository.full_name }}
148-
docker push --all-tags ghcr.io/${{ github.event.repository.full_name }}
146+
uses: docker/build-push-action@v3
147+
with:
148+
context: .
149+
push: true
150+
tags: ${{ steps.meta.outputs.tags }}
151+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)