Files
setup-antigravity/.gitea/workflows/ci.yaml
T
Jeffery a831385e4b
composite-actions/template: CI / BUILD (pull_request) Successful in 5s
chore(CI): 僅在 PR 至 develop 時觸發並移除未使用的環境變數
2026-07-17 17:03:12 +08:00

43 lines
1.8 KiB
YAML
Raw 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.
# ============================================================================
# 用途:本 CI workflow 於對 develop 發出 Pull Request(開啟或更新)時觸發,
# checkout 原始碼後以本 repo 的 composite action 安裝工具,並取得工具版本號驗證安裝。
# 更新時間:2026/07/17 17:02:15
# ============================================================================
# workflow 名稱,顯示於 Gitea Actions 介面
name: CI
# 觸發條件設定區塊
on:
# 針對 Pull Request 事件觸發
pull_request:
# 僅當 PR 目標分支為 develop 時觸發
branches:
- develop
# 僅在 PR 開啟(opened)或有新 commit 更新(synchronize)時觸發
types: [opened, synchronize]
# 工作(job)定義區塊
jobs:
# test job:驗證本 composite action 能正確安裝工具
test:
# job 顯示名稱
name: TEST
# 執行環境(runner 標籤)
runs-on: ubuntu
# 依序執行的步驟清單
steps:
# 取出原始碼,供後續以本地 action(./)安裝工具
- name: 取得存取庫資訊
# 使用 checkout action,版本由 vars.ACTION_CHECKOUT_VERSION 決定
uses: actions/checkout@${{ vars.ACTION_CHECKOUT_VERSION }}
# 引用本 repo 根目錄的 composite action 安裝工具
# 需人工確認:本 action 的 oauth 為必填輸入,此處未傳入;實際執行需以 with: oauth: ${{ secrets.ANTIGRAVITY_OAUTH_B64 }} 傳入
- name: 安裝工具
# uses: ./ 代表使用本 repo 內的 action.yml
uses: ./
# 取得工具版本號以驗證安裝成功
# 需人工確認:agy 安裝於 ~/.local/bin,若未在 PATH 上需先加入(例如寫入 $GITHUB_PATH
- name: 取得工具版本號
# 執行 Antigravity CLIagy)的版本查詢指令
run: agy --version