feat: 修改 CD 工作流使用的 action 來源
This commit is contained in:
@@ -3,25 +3,27 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
jobs:
|
jobs:
|
||||||
version:
|
calculate:
|
||||||
name: "CD > 計算版本號"
|
name: "CD > 計算版本號"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
|
||||||
version: ${{ steps.version.outputs.version }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: 計算版本號
|
- name: 計算版本號
|
||||||
id: version
|
id: calculate
|
||||||
uses: https://gitea.jsc.idv.tw/actions/calculate-version@${{ vars.ACTION_CALCULATE_VERSION }}
|
uses: https://gitea.housefun.com.tw/HP_TOOL/calculate-version-action@v${{ vars.CALCULATE_VERSION }}
|
||||||
release:
|
with:
|
||||||
name: "CD > 發布專案"
|
gitea-server: ${{ gitea.server_url }}
|
||||||
|
repository: ${{ gitea.repository }}
|
||||||
|
token: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
outputs:
|
||||||
|
version: ${{ steps.calculate.outputs.VERSION }}
|
||||||
|
cd:
|
||||||
|
needs: [calculate]
|
||||||
|
name: "[CD] 發布專案"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: version
|
env:
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
steps:
|
steps:
|
||||||
- name: 發布專案
|
- name: 發布專案
|
||||||
uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }}
|
uses: akkuman/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
tag_name: "v${{ needs.version.outputs.version }}"
|
tag_name: "v${{ needs.calculate.outputs.version }}"
|
||||||
- name: 清理成品
|
|
||||||
uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }}
|
|
||||||
with:
|
|
||||||
RUNNER_TOKEN: ${{ secrets.RUNNER_TOKEN }}
|
|
||||||
Reference in New Issue
Block a user