4 Commits

Author SHA1 Message Date
cfddd28be4 Merge pull request 'feat: 重構計算版本號' (#4) from develop into master
All checks were successful
/ CD > 發布專案 (push) Successful in 2s
Reviewed-on: #4
2026-03-20 07:47:10 +00:00
e69490f7b6 Merge pull request '更新 .gitea/workflows/master.yaml' (#3) from develop into master
All checks were successful
/ CD > 發布專案 (push) Successful in 1s
Reviewed-on: #3
2026-03-05 08:10:46 +00:00
1f81d3a887 Merge pull request '更新 .gitea/workflows/master.yaml' (#2) from develop into master
Some checks failed
/ CD > 發布專案 (push) Failing after 0s
Reviewed-on: #2
2026-03-05 08:08:18 +00:00
8b84c5aa6a Merge pull request '更新 .gitea/workflows/master.yaml' (#1) from develop into master
Some checks failed
/ CD > 發布專案 (push) Failing after 0s
Reviewed-on: #1
2026-03-05 08:03:12 +00:00
4 changed files with 12 additions and 14 deletions

View File

@@ -9,15 +9,17 @@ jobs:
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: 計算版本號
id: version
uses: https://gitea.jsc.idv.tw/actions/calculate-version@${{ vars.ACTION_CALCULATE_VERSION }}
with:
gitea-server: ${{ gitea.server_url }}
repository: ${{ gitea.repository }}
token: ${{ secrets.GITEA_TOKEN }}
- name: 發布專案
uses: akkuman/gitea-release-action@${{ vars.ACTION_RELEASE_VERSION }}
with:
tag_name: "v0.0.9"
- name: 計算版本號
id: version
uses: https://gitea.jsc.idv.tw/actions/calculate-version@v0.0.8
- name: 顯示資訊
run: echo ${{ needs.version.outputs.version }}
tag_name: "v${{ steps.version.outputs.VERSION }}"
- name: 清理舊版本 (保留最新2個)
uses: https://gitea.jsc.idv.tw/actions/cleanup-release@${{ vars.ACTION_CLEANUP_RELEASE_VERSION }}
with:

View File

@@ -1,8 +1,8 @@
FROM alpine:latest
# 更新並安裝必要的工具
# 更新並安裝必要的工具後清理暫存檔案以減小映像檔大小
RUN apk update \
&& apk add --no-cache bash curl jq
&& apk add --no-cache curl jq
COPY entrypoint.sh /entrypoint.sh

View File

@@ -1,10 +1,6 @@
name: 'CALCULATE VERSION'
description: '計算版本號'
author: 'Jeffery'
# inputs:
# RUNNER_TOKEN:
# description: 'Gitea Runner 用來存取的 Tokenex: ${{ secrets.RUNNER_TOKEN }}'
# required: true
outputs:
VERSION:
description: '計算出的新版本號'

View File

@@ -12,8 +12,8 @@ echo "GITEA_SERVER_URL=$GITEA_SERVER_URL" && ([ -z "$GITEA_SERVER_URL" ] || [ "$
# 顯示 GITEA_REPOSITORY 參數,並檢查是否為空或 "null",如果是則輸出錯誤訊息並退出
echo "GITEA_REPOSITORY=$GITEA_REPOSITORY" && ([ -z "$GITEA_REPOSITORY" ] || [ "$GITEA_REPOSITORY" = "null" ]) && exit 1
# 顯示 RUNNER_TOKEN 參數
echo "RUNNER_TOKEN=$RUNNER_TOKEN"
# 顯示 RUNNER_TOKEN 參數,並檢查是否為空或 "null",如果是則輸出錯誤訊息並退出
echo "RUNNER_TOKEN=$RUNNER_TOKEN" && ([ -z "$RUNNER_TOKEN" ] || [ "$RUNNER_TOKEN" = "null" ]) && exit 1
echo "=================================================="