From c04dd33481c80ea5b66e526d8b38f43f37d365a9 Mon Sep 17 00:00:00 2001 From: huoxue1 <3343780376@qq.com> Date: Wed, 6 Sep 2023 23:25:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/ci.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: huoxue1 <3343780376@qq.com> --- .gitea/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 5c58411..cdf184e 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -40,10 +40,47 @@ jobs: args: build --snapshot env: GITEA_TOKEN: ${{ secrets.TOKEN }} -# - name: upload-artifact -# uses: actions/upload-artifact@v3 -# with: -# name: my-artifact -# path: dist/*/* + - + name: Set up QEMU + id: qemu + uses: docker/setup-qemu-action@v2 + - + 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: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: huoxue.link:12300/huoxue1/qinglong-go + tags: | + type=raw,value=latest + type=ref,event=tag + - + name: Docker Login + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: huoxue.link:12300 + username: huoxue1 + password: 1743224847gou + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v3 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.meta.outputs.tags }} + cache-from: type=gha + cache-to: type=gha,mode=max + ulimit: core=0:0