Files
test-runner/.gitea/workflows/official-checkout.yml
T
hermes 22763250f9
Official Action - checkout / checkout (push) Successful in 5s
Official Contexts / contexts (push) Successful in 1s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
Gitea Actions Demo / python (push) Canceled after 0s
add official Gitea Actions test cases (quickstart/checkout/contexts)
2026-08-03 15:08:16 +08:00

25 lines
870 B
YAML

# 官方用例 2: actions/checkout@v4 官方 Action 深度验证
# 覆盖: 官方 action 在 Gitea 的兼容性 / 私有仓 clone 认证(GITHUB_TOKEN) / 内容与 commit 完整性
name: Official Action - checkout
on: [push]
jobs:
checkout:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: verify workspace content
run: |
set -e
echo "workspace=$GITHUB_WORKSPACE"
ls -la
test -f README.md || { echo "FAIL: README.md not found"; exit 1; }
echo "OK: repository checked out"
- name: verify commit info
run: |
set -e
test -n "$GITHUB_SHA" || { echo "FAIL: GITHUB_SHA empty"; exit 1; }
echo "sha=$GITHUB_SHA"
git log -1 --oneline
git rev-parse HEAD | grep -q "^${GITHUB_SHA}" && echo "OK: HEAD matches GITHUB_SHA"