Files
s5p/.gitea/workflows/ci.yaml
user de5f586bc7
Some checks failed
ci / test (push) Failing after 0s
ci / secrets (push) Failing after 0s
ci / build (push) Has been skipped
fix: replace actions/checkout with git clone (no node on runner)
The linux runner has no Node.js, so actions/checkout@v4 fails.
Use manual git clone with token auth instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 06:54:18 +01:00

51 lines
1.5 KiB
YAML

name: ci
on:
push:
branches: [main]
jobs:
test:
runs-on: linux
steps:
- run: |
git clone --depth 1 \
-c "http.extraHeader=Authorization: token ${{ github.token }}" \
"${{ github.server_url }}/${{ github.repository }}.git" .
- run: |
podman run --rm \
-v "$PWD:/app:ro" \
-w /app \
python:3.13-alpine \
sh -c "pip install --no-cache-dir -r requirements.txt ruff pytest && \
ruff check src/ tests/ && \
PYTHONPATH=src pytest tests/ -v"
secrets:
runs-on: linux
steps:
- run: |
git clone \
-c "http.extraHeader=Authorization: token ${{ github.token }}" \
"${{ github.server_url }}/${{ github.repository }}.git" .
- run: |
podman run --rm \
-v "$PWD:/scan:ro" \
ghcr.io/gitleaks/gitleaks:latest \
detect --source /scan -v
build:
needs: [test, secrets]
runs-on: linux
steps:
- run: |
git clone --depth 1 \
-c "http.extraHeader=Authorization: token ${{ github.token }}" \
"${{ github.server_url }}/${{ github.repository }}.git" .
- run: echo "$HARBOR_PASS" | podman login -u "$HARBOR_USER" --password-stdin harbor.mymx.me
env:
HARBOR_USER: ${{ secrets.HARBOR_USER }}
HARBOR_PASS: ${{ secrets.HARBOR_PASS }}
- run: podman build -t harbor.mymx.me/s5p/s5p:latest -f Containerfile .
- run: podman push harbor.mymx.me/s5p/s5p:latest