commit 9f5737a24365a637884c5d5ff383b125c2e50bfc Author: actions <> Date: Tue May 5 09:09:25 2026 +0000 Initial commit diff --git a/.gitea/workflows/master.yaml b/.gitea/workflows/master.yaml new file mode 100644 index 0000000..b54c903 --- /dev/null +++ b/.gitea/workflows/master.yaml @@ -0,0 +1,27 @@ +on: + push: + branches: + - master +jobs: + version: + name: "CD > 計算版本號" + 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: "CD > 發布專案" + 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/action.yml b/action.yml new file mode 100644 index 0000000..fe951af --- /dev/null +++ b/action.yml @@ -0,0 +1,31 @@ +name: 'Composite Action Template' +description: 'Composite Action 範本' +author: 'Jeffery' +inputs: + runner_token: + description: 'Gitea Runner Token' + required: true + text: + description: '輸入的文字' + default: "Hello, World!" +outputs: + text: + description: '輸出的文字' + value: ${{ steps.display.outputs.text }} +runs: + using: 'composite' + steps: + - name: 顯示資訊 + id: display + env: + GITEA_SERVER_URL: ${{ gitea.server_url }} + GITEA_REPOSITORY: ${{ gitea.repository }} + RUNNER_TOKEN: ${{ inputs.runner_token }} + TEXT: ${{ inputs.text }} + run: | + echo "Gitea Server Url: $GITEA_SERVER_URL" + echo "Gitea Repository: $GITEA_REPOSITORY" + echo "Gitea Runner Token: $RUNNER_TOKEN" + echo "Input Text: $TEXT" + echo "text=$TEXT" >> "$GITHUB_OUTPUT" + shell: bash \ No newline at end of file