Refactor tag release action and update workflow to use local action
This commit is contained in:
@@ -8,10 +8,7 @@ jobs:
|
||||
name: Release Tag
|
||||
runs-on: ubuntu
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
|
||||
- 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 }}
|
||||
uses: ./
|
||||
|
||||
+18
-29
@@ -1,36 +1,25 @@
|
||||
name: 'Composite Action Template'
|
||||
description: 'Composite Action 範本'
|
||||
name: 'Tag Release'
|
||||
description: 'Tag Release'
|
||||
author: 'Jeffery'
|
||||
inputs:
|
||||
gitea_token:
|
||||
description: 'Gitea Token'
|
||||
required: true
|
||||
text:
|
||||
description: '輸入的文字'
|
||||
files:
|
||||
description: ''
|
||||
required: false
|
||||
default: 'Hello, World!'
|
||||
outputs:
|
||||
text:
|
||||
description: '輸出的文字'
|
||||
value: ${{ steps.change.outputs.text }}
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: 交換
|
||||
id: change
|
||||
- name: 版本號計算
|
||||
id: version-calculate
|
||||
uses: https://gitea.jsc.idv.tw/docker-actions/version-calculate@${{ vars.ACTION_VERSION_CALCULATE_VERSION }}
|
||||
- name: 標註並釋出成品
|
||||
uses: akkuman/gitea-release-action@${{ vars.ACTION_GITEA_RELEASE_VERSION }}
|
||||
env:
|
||||
GITEA_SERVER_URL: ${{ gitea.server_url }}
|
||||
GITEA_REPOSITORY: ${{ gitea.repository }}
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN || inputs.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
|
||||
NAME: ${{ gitea.repository##*/ }}
|
||||
VERSION: v${{ steps.version-calculate.outputs.version }}
|
||||
with:
|
||||
name: $NAME $VERSION
|
||||
tag_name: $VERSION
|
||||
target_commitish: ${{ gitea.ref }}
|
||||
files: ${{ inputs.files }}
|
||||
- name: 清理舊成品
|
||||
uses: https://gitea.jsc.idv.tw/docker-actions/release-cleanup@${{ vars.ACTION_RELEASE_CLEANUP_VERSION }}
|
||||
Reference in New Issue
Block a user