From 91dee302628d68a34a7b9e2afb5e7dbcab78b0da Mon Sep 17 00:00:00 2001 From: Jeffery Date: Thu, 25 Jun 2026 10:57:32 +0000 Subject: [PATCH 1/4] =?UTF-8?q?fix(release=20cleanup):=20=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=20action=20token=20=E5=82=B3=E9=81=9E=E8=88=87?= =?UTF-8?q?=E4=B8=AD=E7=B9=BC=E8=B3=87=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/action.yaml b/action.yaml index 856028f..560e05c 100644 --- a/action.yaml +++ b/action.yaml @@ -1,5 +1,5 @@ -name: 'Docker Action Template' -description: 'Docker Action 範本' +name: 'Release Cleanup' +description: 'Release Cleanup' author: 'Jeffery' inputs: keep_count: @@ -12,5 +12,5 @@ runs: env: GITEA_SERVER_URL: ${{ gitea.server_url }} GITEA_REPOSITORY: ${{ gitea.repository }} - GITEA_TOKEN: ${{ secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN }} - KEEP_COUNT: ${{ inputs.keep_count }} \ No newline at end of file + RUNNER_TOKEN: ${{ gitea.token }} + KEEP_COUNT: ${{ inputs.keep_count }} -- 2.53.0 From 2f0a1b72c1a74d9d4e04ba031517dedb2cdc766b Mon Sep 17 00:00:00 2001 From: Jeffery Date: Thu, 25 Jun 2026 10:57:32 +0000 Subject: [PATCH 2/4] =?UTF-8?q?style(Dockerfile):=20=E6=95=B4=E7=90=86?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E8=88=87=E6=AA=94=E5=B0=BE=E6=8F=9B=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index dc04252..0a80edf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,9 @@ FROM alpine:latest # 安裝必要的工具 RUN apk add --no-cache --no-check-certificate bash curl jq - + COPY entrypoint.sh /entrypoint.sh + RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/entrypoint.sh"] -- 2.53.0 From 034c1ce67b429fbd6f71fdbda3841db811dea401 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Thu, 25 Jun 2026 10:57:32 +0000 Subject: [PATCH 3/4] =?UTF-8?q?chore(Gitea=20Actions):=20=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E5=B7=A5=E4=BD=9C=E6=B5=81=E7=A8=8B=E8=B7=AF=E5=BE=91?= =?UTF-8?q?=E8=88=87=E7=99=BC=E7=89=88=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea / workflows/cd.yaml | 17 ----------------- .gitea/workflows/cd.yaml | 12 ++++++++++++ .../ workflows => .gitea/workflows}/ci.yaml | 8 ++++---- 3 files changed, 16 insertions(+), 21 deletions(-) delete mode 100644 .gitea / workflows/cd.yaml create mode 100644 .gitea/workflows/cd.yaml rename { .gitea / workflows => .gitea/workflows}/ci.yaml (78%) diff --git a/ .gitea / workflows/cd.yaml b/ .gitea / workflows/cd.yaml deleted file mode 100644 index 7b9122c..0000000 --- a/ .gitea / workflows/cd.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: CD -on: - push: - branches: - - master -jobs: - release-tag: - name: Release Tag - runs-on: ubuntu - steps: - - 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 }} diff --git a/.gitea/workflows/cd.yaml b/.gitea/workflows/cd.yaml new file mode 100644 index 0000000..c258dc6 --- /dev/null +++ b/.gitea/workflows/cd.yaml @@ -0,0 +1,12 @@ +name: CD +on: + push: + branches: + - master +jobs: + release-tag: + name: Release Tag + runs-on: ubuntu + steps: + - name: Release Tag + uses: https://gitea.jsc.idv.tw/composite-actions/release-tag@${{ vars.ACTION_RELEASE_TAG_VERSION }} diff --git a/ .gitea / workflows/ci.yaml b/.gitea/workflows/ci.yaml similarity index 78% rename from .gitea / workflows/ci.yaml rename to .gitea/workflows/ci.yaml index c80bf56..21895bf 100644 --- a/ .gitea / workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -4,14 +4,14 @@ on: branches-ignore: - master types: [opened, synchronize] -permissions: - contents: write - pull-requests: write - issues: write jobs: ai-code-review: name: Code Review runs-on: ubuntu + permissions: + contents: write + pull-requests: write + issues: write steps: - name: Code Review uses: https://gitea.jsc.idv.tw/composite-actions/opencode-code-review@${{ vars.ACTION_AI_CODE_REVIEW_VERSION }} -- 2.53.0 From 0e91eb6cf3464180d0f17d3b28b84fa7840c4c5d Mon Sep 17 00:00:00 2001 From: Jeffery Date: Thu, 25 Jun 2026 10:58:56 +0000 Subject: [PATCH 4/4] =?UTF-8?q?fix(release=20cleanup):=20=E6=94=B9?= =?UTF-8?q?=E7=94=A8=20GITEA=5FTOKEN=20=E5=91=BC=E5=8F=AB=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yaml | 2 +- entrypoint.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/action.yaml b/action.yaml index 560e05c..ff09055 100644 --- a/action.yaml +++ b/action.yaml @@ -12,5 +12,5 @@ runs: env: GITEA_SERVER_URL: ${{ gitea.server_url }} GITEA_REPOSITORY: ${{ gitea.repository }} - RUNNER_TOKEN: ${{ gitea.token }} + GITEA_TOKEN: ${{ gitea.token }} KEEP_COUNT: ${{ inputs.keep_count }} diff --git a/entrypoint.sh b/entrypoint.sh index cfa7dc0..dfefcad 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -79,17 +79,17 @@ require_value "GITEA_REPOSITORY" "$GITEA_REPOSITORY" require_value "KEEP_COUNT" "$KEEP_COUNT" require_integer "KEEP_COUNT" "$KEEP_COUNT" -if is_empty_or_null "${RUNNER_TOKEN:-}"; then - warn "RUNNER_TOKEN is empty; release API calls will be anonymous" +if is_empty_or_null "${GITEA_TOKEN:-}"; then + warn "GITEA_TOKEN is empty; release API calls will be anonymous" else - info "RUNNER_TOKEN=[redacted]" + info "GITEA_TOKEN=[redacted]" fi release_api_url="$GITEA_SERVER_URL/api/v1/repos/$GITEA_REPOSITORY/releases" auth_header=() -if ! is_empty_or_null "${RUNNER_TOKEN:-}"; then - auth_header=(-H "Authorization: token $RUNNER_TOKEN") +if ! is_empty_or_null "${GITEA_TOKEN:-}"; then + auth_header=(-H "Authorization: token $GITEA_TOKEN") fi section "取得成品資訊" -- 2.53.0