Skip to content

Commit

Permalink
fix: fix workflow script
Browse files Browse the repository at this point in the history
  • Loading branch information
gitsang committed Nov 21, 2024
1 parent cde3960 commit 9d6a13c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,34 @@ jobs:

- name: Get Version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
shell: bash
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT

- name: Login Docker Hub
uses: docker/login-action@master
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and Push Docker
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build
shell: bash
run: |
NAME=ddns
DIST=dist
DOCKER_REGISTRY=gitsang
VERSION=${{ steps.get_version.outputs.VERSION }}
CGO_ENABLED=0 go build -o ${DIST}/${NAME} ./cmd
- name: Build docker and publish
NAME=ddns
DIST=dist
VERSION=${{ steps.get_version.outputs.VERSION }}
DOCKER_REGISTRY=gitsang
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8 \
--no-cache \
Expand Down

0 comments on commit 9d6a13c

Please sign in to comment.