fix test workflow
All checks were successful
deploy / deploy (push) Successful in 11s
test / smoke-test (push) Successful in 8s

This commit is contained in:
Dusan Vojacek
2026-04-05 18:29:25 +02:00
parent 679777d140
commit caf3f522e2
2 changed files with 22 additions and 4 deletions

View File

@@ -9,11 +9,29 @@ on:
jobs:
smoke-test:
# Stejný label jako deploy.yml — výchozí act_runner má typicky jen `self-hosted`,
# ne `ubuntu-latest` (ten by vyžadoval GITEA_RUNNER_LABELS s docker:// image).
# Stejný label jako deploy.yml — výchozí act_runner má typicky jen `self-hosted`.
runs-on: self-hosted
# Výchozí job image často nemá Node → `actions/checkout@v4` padá na „Cannot find: node“.
# alpine/git je malý a stačí na shallow clone přes token (Gitea = GitHub-kompatibilní kontext).
container:
image: alpine/git:latest
steps:
- uses: actions/checkout@v4
- name: Checkout
env:
TOKEN: ${{ github.token }}
run: |
set -eu
su="${{ github.server_url }}"
case "$su" in
https://*) clone_url="https://oauth2:${TOKEN}@${su#https://}" ;;
http://*) clone_url="http://oauth2:${TOKEN}@${su#http://}" ;;
*) echo "unknown github.server_url: $su"; exit 1 ;;
esac
clone_url="${clone_url}/${{ github.repository }}.git"
git init
git remote add origin "$clone_url"
git fetch --depth=1 origin "${{ github.sha }}"
git checkout -qf FETCH_HEAD
- name: Repo layout
run: |