From 9ca7cc8f9770d14ab6d6f3427db47d660aff0aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AF=BB=E6=AC=A2?= Date: Wed, 2 Apr 2025 14:46:42 +0800 Subject: [PATCH] =?UTF-8?q?:green=5Fheart:=20=E6=B7=BB=E5=8A=A0=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=89=93=E5=8C=85=E5=B9=B6=E7=A7=BB=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/docker-image.yaml | 55 ++++++++++++++++++++++++++++++ templates/README.md | 6 ---- 2 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 .gitea/workflows/docker-image.yaml delete mode 100644 templates/README.md diff --git a/.gitea/workflows/docker-image.yaml b/.gitea/workflows/docker-image.yaml new file mode 100644 index 0000000..b56feda --- /dev/null +++ b/.gitea/workflows/docker-image.yaml @@ -0,0 +1,55 @@ +name: BuildImage + +on: + push: + branches: + - main + # tags: + # - '*' + +jobs: + build-image: + runs-on: ubuntu-latest + container: + # 使用这个镜像,不然Docker无法打包镜像 + image: catthehacker/ubuntu:act-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Gen Tags + id: gen_tags + uses: docker/metadata-action@v5 + with: + images: gitee.ltd/lxh/wechat-robot + flavor: | + latest=true + tags: | + type=raw,value={{date 'YYYYMMDD' tz='Asia/Shanghai'}} + + - name: Print Tags + run: | + echo "${{ steps.gen_tags.outputs.tags }}" + echo "----------------- labels -----------------" + echo "${{ steps.meta.outputs.labels }}" + + - name: Login to Repository + uses: docker/login-action@v2 + with: + registry: gitee.ltd + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + + - name: Build image + uses: docker/build-push-action@v6 + with: + push: true + no-cache: true + tags: ${{ steps.gen_tags.outputs.tags }} + labels: ${{ steps.gen_tags.outputs.labels }} + + - name: Clear images + run: | + docker images | grep "gitee.ltd/lxh/wechat-robot" + docker rmi -f $(docker images | grep "gitee.ltd/lxh/wechat-robot" | awk '{print $3}') diff --git a/templates/README.md b/templates/README.md deleted file mode 100644 index 537b887..0000000 --- a/templates/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# HTML模板 - -此目录包含Web页面的HTML模板: -- 布局模板 -- 页面模板 -- 组件模板