Update build.yml

This commit is contained in:
0xJacky 2022-08-05 15:39:56 +08:00
parent 7595ff41e3
commit 993e3c7c89
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0

View file

@ -188,24 +188,24 @@ jobs:
files: ${{ env.DIST }}.tar.gz files: ${{ env.DIST }}.tar.gz
- name: Set up Docker Buildx - name: Set up Docker Buildx
if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOOS == 'amd64' if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOARCH == 'amd64'
id: buildx id: buildx
uses: docker/setup-buildx-action@v1 uses: docker/setup-buildx-action@v1
- name: Login to DockerHub - name: Login to DockerHub
if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOOS == 'amd64' if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOARCH == 'amd64'
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:
username: ${{ secrets.DOCKERHUB_USER }} username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Prepare Dockerfile - name: Prepare Dockerfile
if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOOS == 'amd64' if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOARCH == 'amd64'
run: | run: |
cp ./Dockerfile ./dist cp ./Dockerfile ./dist
- name: Build and push - name: Build and push
if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOOS == 'amd64' if: github.event_name == 'release' && env.GOOS == 'linux' && env.GOARCH == 'amd64'
uses: docker/build-push-action@v2 uses: docker/build-push-action@v2
with: with:
context: ./dist context: ./dist