From 2350e8b1475ffce66cae107ddf8ab7880900cebe Mon Sep 17 00:00:00 2001 From: GITEA COMPOSITE ACTIONS Date: Mon, 29 Jun 2026 03:15:10 +0000 Subject: [PATCH] Initial commit --- .gitea/workflows/cd.yaml | 12 ++++++++++++ .gitea/workflows/ci.yaml | 19 +++++++++++++++++++ action.yml | 33 +++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 .gitea/workflows/cd.yaml create mode 100644 .gitea/workflows/ci.yaml create mode 100644 action.yml diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml new file mode 100644 index 0000000..30b1952 --- /dev/null +++ b/.gitea/workflows/cd.yaml @@ -0,0 +1,12 @@ +name: CD +on: + push: + branches: + - master +jobs: + release-tag-version: + name: Release Tag Version + runs-on: ubuntu + steps: + - name: 釋出並標註成品版本 + uses: https://gitea.jsc.idv.tw/composite-actions/release-tag-version@${{ vars.ACTION_RELEASE_TAG_VERSION }} diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..15c4240 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,19 @@ +name: CI +on: + pull_request: + branches-ignore: + - master + types: [opened, synchronize] +jobs: + ai-code-review: + name: AI Code Review + runs-on: ubuntu + permissions: + contents: write + pull-requests: write + issues: write + steps: + - name: AI 程式碼審查 by OpenCode + uses: https://gitea.jsc.idv.tw/composite-actions/opencode-code-review@${{ vars.ACTION_OPENCODE_CODE_REVIEW_VERSION }} + with: + token: ${{ secrets.TOKEN }} diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..646c3c6 --- /dev/null +++ b/action.yml @@ -0,0 +1,33 @@ +name: 'Composite Action Template' +description: 'Composite Action 範本' +author: 'Jeffery' +inputs: + text: + description: '輸入的文字' + required: false + default: 'Hello, World!' +outputs: + text: + description: '輸出的文字' + value: ${{ steps.change.outputs.text }} +runs: + using: 'composite' + steps: + - name: 交換 + id: change + env: + GITEA_SERVER_URL: ${{ gitea.server_url }} + GITEA_REPOSITORY: ${{ gitea.repository }} + GITEA_TOKEN: ${{ gitea.token }} + TEXT: ${{ inputs.text }} + run: | + echo "Gitea Server Url: $GITEA_SERVER_URL" + + echo "Gitea Repository: $GITEA_REPOSITORY" + + echo "Gitea Token: $GITEA_TOKEN" + + echo "Text: $TEXT" + + echo "text=$TEXT" >> "$GITHUB_OUTPUT" + shell: bash \ No newline at end of file