fix(action.yml): 避免空版本產生錯誤標籤
This commit is contained in:
+8
-2
@@ -13,15 +13,21 @@ runs:
|
||||
uses: https://gitea.jsc.idv.tw/docker-actions/calculate-version@${{ vars.ACTION_CALCULATE_VERSION }}
|
||||
- name: 組合釋出參數
|
||||
id: release-params
|
||||
shell: bash
|
||||
run: |
|
||||
repository="${{ gitea.repository }}"
|
||||
version="v${{ steps.version-calculate.outputs.version }}"
|
||||
version_value="${{ steps.version-calculate.outputs.version }}"
|
||||
if [ -z "$version_value" ]; then
|
||||
echo "version-calculate output version is empty" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
version="v${version_value}"
|
||||
repository_name="${repository##*/}"
|
||||
{
|
||||
echo "name=${repository_name} ${version}"
|
||||
echo "tag_name=${version}"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
shell: bash
|
||||
- name: 釋出並標註成品版本
|
||||
uses: akkuman/gitea-release-action@${{ vars.ACTION_GITEA_RELEASE_VERSION }}
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user