From 6e07893e0d75b52309fd8a06e58a391e82dad7ba Mon Sep 17 00:00:00 2001 From: sangge-redmi <2251250136@qq.com> Date: Thu, 16 Jan 2025 10:17:42 +0800 Subject: [PATCH] update ci --- .gitea/workflows/build-image.yaml | 11 ++++++--- .gitea/workflows/ci.yaml | 40 +++---------------------------- 2 files changed, 11 insertions(+), 40 deletions(-) diff --git a/.gitea/workflows/build-image.yaml b/.gitea/workflows/build-image.yaml index 351c50f..b1892f9 100644 --- a/.gitea/workflows/build-image.yaml +++ b/.gitea/workflows/build-image.yaml @@ -4,9 +4,9 @@ on: push: paths: - "basedockerfile" - - ".gitea/workflows/build_image.yaml" - # schedule: - # - cron: "0 0 1 * *" # 每月1号00:00执行 + - ".gitea/workflows/build-image.yaml" + schedule: + - cron: "0 0 1 * *" # 每月1号00:00执行 env: REGISTRY: git.mamahaha.work @@ -15,9 +15,14 @@ env: jobs: build-and-push: runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + steps: - name: Checkout repository uses: https://git.mamahaha.work/actions/checkout@v4 + with: + submodules: "recursive" - name: Set up Docker Buildx uses: https://git.mamahaha.work/actions/setup-buildx-action@v3 diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 47ec17c..3d6b63c 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -1,15 +1,9 @@ name: Test CI on: - push - # push: - # paths: - # - "src/**" - # - -env: - REGISTRY: git.mamahaha.work - IMAGE_NAME: tpre + push: + paths: + - "src/**" jobs: test: @@ -27,31 +21,3 @@ jobs: # run: | # ls $PWD/src # docker run --rm -v .:/app git.mamahaha.work/sangge/tpre:base ls - - build-and-push: - runs-on: ubuntu-latest - container: - image: catthehacker/ubuntu:act-latest - - steps: - - name: Checkout repository - uses: https://git.mamahaha.work/actions/checkout@v4 - - - name: Set up Docker Buildx - uses: https://git.mamahaha.work/actions/setup-buildx-action@v3 - - - name: Login to Private Registry - uses: https://git.mamahaha.work/actions/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - - - name: Build and push - uses: https://git.mamahaha.work/actions/build-push-action@v5 - with: - context: . - file: basedockerfile - push: true - tags: | - ${{ env.REGISTRY }}/sangge/${{ env.IMAGE_NAME }}:base