From 51cb6d90b2459f6ba72d43c17391316b5528f496 Mon Sep 17 00:00:00 2001 From: Promix953 Date: Sat, 6 Aug 2022 02:02:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddocker=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/push-to-docker.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push-to-docker.yml b/.github/workflows/push-to-docker.yml index 103d716..318c1aa 100644 --- a/.github/workflows/push-to-docker.yml +++ b/.github/workflows/push-to-docker.yml @@ -40,13 +40,18 @@ jobs: name: Set up Docker Buildx id: buildx uses: docker/setup-buildx-action@v2 + - + name: Check snapshot + if: "!startsWith(github.ref, 'refs/tags/')" + id: snapshot + run: echo '::set-output name=ARG::--snapshot' - name: Run GoReleaser uses: goreleaser/goreleaser-action@v3 with: distribution: goreleaser version: latest - args: build --rm-dist + args: build --rm-dist ${{ steps.snapshot.outputs.ARG }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - From d0b2a9d5c938e8348392294949104e4d47c5a0f7 Mon Sep 17 00:00:00 2001 From: Geeter Date: Sat, 6 Aug 2022 03:08:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddocker=E9=95=9C=E5=83=8Ft?= =?UTF-8?q?ag=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/push-to-docker.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/push-to-docker.yml b/.github/workflows/push-to-docker.yml index 318c1aa..27dc502 100644 --- a/.github/workflows/push-to-docker.yml +++ b/.github/workflows/push-to-docker.yml @@ -17,6 +17,11 @@ jobs: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 + - + name: Fetch all tags + run: git fetch --force --tags - name: Set up Go uses: actions/setup-go@v3 @@ -78,4 +83,4 @@ jobs: context: . push: ${{ github.event_name != 'pull_request' }} platforms: linux/amd64,linux/arm64 - tags: ${{ steps.meta.outputs.tags }} \ No newline at end of file + tags: ${{ steps.meta.outputs.tags }}