diff --git a/ .gitea / workflows/cd.yaml b/ .gitea / workflows/cd.yaml index 7b9122c..9ede513 100644 --- a/ .gitea / workflows/cd.yaml +++ b/ .gitea / workflows/cd.yaml @@ -4,14 +4,9 @@ on: branches: - master jobs: - release-tag: - name: Release Tag + release-tag-version: + name: Release Tag Version runs-on: ubuntu steps: - - name: Release Tag - uses: https://gitea.jsc.idv.tw/composite-actions/release-tag@${{ vars.ACTION_VERSION_CALCULATE_VERSION }} - with: - gitea_token: ${{ secrets.GITEA_TOKEN }} - gitea_release: ${{ vars.ACTION_GITEA_RELEASE_VERSION }} - version_calculate: ${{ vars.ACTION_VERSION_CALCULATE_VERSION }} - release_cleanup: ${{ vars.ACTION_RELEASE_CLEANUP_VERSION }} + - name: 釋出並標註成品版本 + uses: https://gitea.jsc.idv.tw/composite-actions/release-tag-version@${{ vars.ACTION_RELEASE_TAG_VERSION }} \ No newline at end of file diff --git a/ .gitea / workflows/ci.yaml b/ .gitea / workflows/ci.yaml index c80bf56..30e59b3 100644 --- a/ .gitea / workflows/ci.yaml +++ b/ .gitea / workflows/ci.yaml @@ -4,14 +4,29 @@ on: branches-ignore: - master types: [opened, synchronize] -permissions: - contents: write - pull-requests: write - issues: write jobs: - ai-code-review: - name: Code Review + release-tag-version: + name: Release Tag Version + runs-on: ubuntu + outputs: + version: ${{ steps.release-tag-version.outputs.version }} + steps: + - name: 計算版本號 + id: release-tag-version + uses: https://gitea.jsc.idv.tw/composite-actions/release-tag-version@${{ vars.ACTION_RELEASE_TAG_VERSION }} + with: + is_beta: 'true' + ai-pull-request: + name: AI Pull Request + needs: release-tag-version runs-on: ubuntu steps: - - name: Code Review - uses: https://gitea.jsc.idv.tw/composite-actions/opencode-code-review@${{ vars.ACTION_AI_CODE_REVIEW_VERSION }} + - name: 安裝 AI 工具 + uses: https://gitea.jsc.idv.tw/composite-actions/codex@${{ vars.ACTION_CODEX_VERSION }} + with: + oauth: ${{ secrets.CODEX_OAUTH }} + - name: AI Pull Request + uses: https://gitea.jsc.idv.tw/docker-actions/ai-pull-request@v${{ needs.release-tag-version.outputs.version }} + with: + token: ${{ secrets.TOKEN }} + model: ${{ vars.AI_PULL_REQUEST_MODEL }} diff --git a/action.yaml b/action.yaml index 2000f7c..8f5ee02 100644 --- a/action.yaml +++ b/action.yaml @@ -1,14 +1,13 @@ -name: 'Docker Action Template' -description: 'Docker Action 範本' +name: 'AI Pull Request' +description: 'AI Pull 合併請求' author: 'Jeffery' inputs: - gitea_token: - description: 'Gitea Token' + token: + description: '' + required: true + model: + description: '' required: true - text: - description: '輸入的文字' - required: false - default: 'Hello, World!' outputs: text: description: '輸出的文字' @@ -18,5 +17,5 @@ runs: env: GITEA_SERVER_URL: ${{ gitea.server_url }} GITEA_REPOSITORY: ${{ gitea.repository }} - GITEA_TOKEN: ${{ secrets.GITEA_TOKEN || inputs.gitea_token }} + GITEA_TOKEN: ${{ inputs.token || gitea.token }} TEXT: ${{ inputs.text }} \ No newline at end of file