Files
Jeffery 676cd825bf
docker-actions/template: CI / BUILD (pull_request) Successful in 4s
fix(token 注入): action.yml 以 env 傳入 gitea.token 供容器讀取
2026-07-17 12:56:45 +08:00

21 lines
799 B
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Clean Old Release
description: 依建立時間將 release 分為正式版與 beta 版,各自保留最新指定筆數,其餘舊 release 連同對應 git tag 一併刪除。
author: Jeffery
inputs:
keep_count:
description: 正式版 release 要保留的最新筆數
required: false
default: '5'
keep_count_beta:
description: beta 版(tag 名稱含 betarelease 要保留的最新筆數
required: false
default: '10'
runs:
using: docker
image: dockerfile
entrypoint: /action/entrypoint.sh
env:
# 將 Gitea 自動提供的 token 注入容器環境,供 index.js 讀取 GITHUB_TOKENGITEA_TOKEN 用;
# docker action 不會自動把 token 帶進容器,須在此明確以 ${{ gitea.token }} 賦值傳入
GITHUB_TOKEN: ${{ gitea.token }}