From f24d2bc600a9cd7aff215acb2ce03e13d00259eb Mon Sep 17 00:00:00 2001 From: Jeffery Date: Thu, 25 Jun 2026 05:56:51 +0000 Subject: [PATCH] =?UTF-8?q?chore(workflows):=20=E6=94=B9=E7=94=A8=E5=85=B1?= =?UTF-8?q?=E7=94=A8=20CI/CD=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/cd.yaml | 14 ++++++++++++++ .gitea/workflows/ci.yaml | 17 +++++++++++++++++ .gitea/workflows/master.yaml | 28 ---------------------------- .gitea/workflows/review.yaml | 23 ----------------------- 4 files changed, 31 insertions(+), 51 deletions(-) create mode 100644 .gitea/workflows/cd.yaml create mode 100644 .gitea/workflows/ci.yaml delete mode 100644 .gitea/workflows/master.yaml delete mode 100644 .gitea/workflows/review.yaml diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml new file mode 100644 index 0000000..b795d75 --- /dev/null +++ b/.gitea/workflows/cd.yaml @@ -0,0 +1,14 @@ +name: CD +on: + push: + branches: + - master +jobs: + cd: + uses: https://gitea.jsc.idv.tw/workflows/cd/action.yaml + with: + CALCULATE_VERSION: ${{ vars.ACTION_CALCULATE_VERSION }} + RELEASE_VERSION: ${{ vars.ACTION_RELEASE_VERSION }} + CLEANUP_RELEASE_VERSION: ${{ vars.ACTION_CLEANUP_RELEASE_VERSION }} + secrets: + GITEA_TOKEN: ${{ secrets.RUNNER_TOKEN }} diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..0d3c8d1 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,17 @@ +name: CI +on: + pull_request: + branches-ignore: + - master + types: [opened, synchronize] +jobs: + ci: + uses: https://gitea.jsc.idv.tw/workflows/ci/action.yaml + with: + CODE_REVIEW_VERSION: ${{ vars.ACTION_CODE_REVIEW_VERSION }} + CODE_REVIEW_TOOL: ${{ vars.CODE_REVIEW_TYPE }} + CODE_REVIEW_BASE_URL: ${{ vars.CODE_REVIEW_BASE_URL }} + CODE_REVIEW_PROVIDER: ${{ vars.CODE_REVIEW_PROVIDER }} + CODE_REVIEW_MODEL: ${{ vars.CODE_REVIEW_MODEL }} + secrets: + GITEA_TOKEN: ${{ secrets.RUNNER_TOKEN }} diff --git a/.gitea/workflows/master.yaml b/.gitea/workflows/master.yaml deleted file mode 100644 index b37b091..0000000 --- a/.gitea/workflows/master.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: CD -on: - push: - branches: - - master -jobs: - version: - name: 計算版本號 - runs-on: ubuntu - outputs: - version: ${{ steps.version.outputs.version }} - steps: - - name: 計算版本號 - id: version - uses: https://gitea.jsc.idv.tw/actions/calculate-version@${{ vars.ACTION_CALCULATE_VERSION }} - release: - name: 發布專案 - runs-on: ubuntu - needs: version - steps: - - name: 發布專案 - uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }} - with: - tag_name: v${{ needs.version.outputs.version }} - - name: 清理成品 - uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }} - with: - RUNNER_TOKEN: ${{ secrets.RUNNER_TOKEN }} \ No newline at end of file diff --git a/.gitea/workflows/review.yaml b/.gitea/workflows/review.yaml deleted file mode 100644 index 34ce86b..0000000 --- a/.gitea/workflows/review.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: AI -on: - pull_request: - branches-ignore: - - master - types: [opened, synchronize] -jobs: - code-review: - name: Code Review - runs-on: ubuntu - steps: - - name: AI Code Review - uses: https://gitea.jsc.idv.tw/actions/code-review@${{ vars.ACTION_CODE_REVIEW_VERSION }} - with: - GITEA_TOKEN: ${{ secrets.RUNNER_TOKEN }} - GITEA_COMMENT_TOKEN: ${{ secrets.GITEA_TOKEN }} - GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }},${{ secrets.GEMINI_API_KEY_1 }},${{ secrets.GEMINI_API_KEY_2 }},${{ secrets.GEMINI_API_KEY_3 }},${{ secrets.GEMINI_API_KEY_4 }},${{ secrets.GEMINI_API_KEY_5 }},${{ secrets.GEMINI_API_KEY_6 }},${{ secrets.GEMINI_API_KEY_7 }},${{ secrets.GEMINI_API_KEY_8 }},${{ secrets.GEMINI_API_KEY_9 }},${{ secrets.GEMINI_API_KEY_10 }},${{ secrets.GEMINI_API_KEY_11 }},${{ secrets.GEMINI_API_KEY_12 }},${{ secrets.GEMINI_API_KEY_13 }},${{ secrets.GEMINI_API_KEY_14 }},${{ secrets.GEMINI_API_KEY_15 }},${{ secrets.GEMINI_API_KEY_16 }},${{ secrets.GEMINI_API_KEY_17 }},${{ secrets.GEMINI_API_KEY_18 }},${{ secrets.GEMINI_API_KEY_19 }} - GEMINI_BASE_URL: https://generativelanguage.googleapis.com/v1beta - GEMINI_MODEL: ${{ vars.GEMINI_MODEL }} - permissions: - contents: write - pull-requests: write - issues: write \ No newline at end of file