refactor: uppercase action inputs

This commit is contained in:
2026-05-15 02:16:26 +00:00
parent bfe5d46d19
commit 68e7842586
2 changed files with 16 additions and 16 deletions
+12 -12
View File
@@ -13,7 +13,7 @@
Action 會依序嘗試以下來源:
1. `inputs.runner_token`
1. `inputs.RUNNER_TOKEN`
2. `secrets.GITEA_TOKEN`
3. `secrets.RUNNER_TOKEN`
@@ -23,9 +23,9 @@ Action 會依序嘗試以下來源:
| 名稱 | 類型 | 預設值 | 說明 |
| --- | --- | --- | --- |
| `runner_token` | string | - | Gitea API token,優先順序最高 |
| `keep_versions` | integer string | `2` | 每個套件要保留的最新版本數,必須是整數且 `>= 0` |
| `dry_run` | boolean string | `true` | `true` 只列出候選,`false` 才會呼叫 DELETE API |
| `RUNNER_TOKEN` | string | - | Gitea API token,優先順序最高 |
| `KEEP_VERSIONS` | integer string | `2` | 每個套件要保留的最新版本數,必須是整數且 `>= 0` |
| `DRY_RUN` | boolean string | `true` | `true` 只列出候選,`false` 才會呼叫 DELETE API |
## Log 行為
@@ -48,13 +48,13 @@ Action 會依序嘗試以下來源:
```yaml
jobs:
cleanup:
runs-on: ubuntu-latest
runs-on: ubuntu
steps:
- uses: ./
with:
runner_token: ${{ secrets.GITEA_TOKEN }}
keep_versions: 2
dry_run: true
RUNNER_TOKEN: ${{ secrets.GITEA_TOKEN }}
KEEP_VERSIONS: 2
DRY_RUN: true
```
### 實際刪除
@@ -62,13 +62,13 @@ jobs:
```yaml
jobs:
cleanup:
runs-on: ubuntu-latest
runs-on: ubuntu
steps:
- uses: ./
with:
runner_token: ${{ secrets.GITEA_TOKEN }}
keep_versions: 2
dry_run: false
RUNNER_TOKEN: ${{ secrets.GITEA_TOKEN }}
KEEP_VERSIONS: 2
DRY_RUN: false
```
## 測試