Demo / hello (push) Successful in 37s
Pin to v4.4.0 by SHA, so the demo workflow no longer follows a moving tag. Refs DevOps/software-infrastructure#46 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
# Demo workflow showing Gitea Actions running on the in-cluster runner.
|
|
name: Demo
|
|
on:
|
|
push:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
hello:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Say hello
|
|
run: |
|
|
echo "Hello from Gitea Actions on ${{ gitea.server_url }}"
|
|
echo "Repository: ${{ gitea.repository }}"
|
|
echo "Ref: ${{ gitea.ref }}"
|
|
echo "Commit: ${{ gitea.sha }}"
|
|
echo "Triggered by: ${{ gitea.actor }} (${{ gitea.event_name }})"
|
|
|
|
- name: Check out the role
|
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
|
|
|
|
- name: Show the role layout
|
|
run: find . -path ./.git -prune -o -type f -print | sort
|
|
|
|
- name: Validate YAML
|
|
run: |
|
|
python3 -c 'import yaml' 2>/dev/null || (apt-get update -qq && apt-get install -y -qq python3-yaml >/dev/null)
|
|
python3 - <<'PY'
|
|
import pathlib, sys
|
|
import yaml
|
|
bad = 0
|
|
for p in sorted(pathlib.Path('.').rglob('*.y*ml')):
|
|
if '.git' in p.parts:
|
|
continue
|
|
try:
|
|
yaml.safe_load(p.read_text())
|
|
print(f"ok {p}")
|
|
except yaml.YAMLError as e:
|
|
bad += 1
|
|
print(f"FAIL {p}: {e}")
|
|
sys.exit(1 if bad else 0)
|
|
PY
|