Files
Chronos/.gitea/workflows/probe.yml
T
Alby96andClaude Opus 5.5 fe6ec3a9b4
Probe / registry (push) Successful in 11s
Probe / archive (push) Successful in 23s
ci: probe registry sign-in
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 10:15:28 +02:00

53 lines
2.3 KiB
YAML

# Temporary probe of the Gitea runner (deleted after use): registry sign-in with the automatic token, archive download.
name: Probe
on:
push:
branches: [ci-probe]
workflow_dispatch:
jobs:
registry:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Tools of the runner image
run: |
docker buildx version || echo "no buildx"
docker info --format 'buildkit default: {{.ClientInfo.DefaultContext}}' 2>/dev/null || true
- name: Packages API and registry sign-in with the automatic token
env:
TOKEN: ${{ github.token }}
run: |
for path in "packages/BalboSoft" "packages/Alby96" "repos/BalboSoft/Chronos" "user"; do
code=$(curl -s -o /tmp/r.txt -w '%{http_code}' -H "Authorization: token $TOKEN" "${{ github.server_url }}/api/v1/$path")
echo "GET /api/v1/$path -> $code $(head -c 160 /tmp/r.txt)"
done
for user in "${{ github.actor }}" gitea-actions x-access-token BalboSoft; do
if printf '%s' "$TOKEN" | timeout 60 docker login gitea.encke-hake.ts.net -u "$user" --password-stdin > /tmp/login.txt 2>&1; then
echo "login as $user: OK"; docker logout gitea.encke-hake.ts.net > /dev/null 2>&1 || true
else
echo "login as $user: FAILED $(tail -1 /tmp/login.txt)"
fi
done
code=$(curl -s -o /tmp/t.txt -w '%{http_code}' -u "x:$TOKEN" "https://gitea.encke-hake.ts.net/v2/token?service=container_registry&scope=repository:balbosoft/chronos-probe:push,pull")
echo "token endpoint -> $code $(head -c 200 /tmp/t.txt)"
archive:
runs-on: ubuntu-latest
container:
image: ruby:3.3-alpine
steps:
- name: Sources as an archive, YAML check
env:
TOKEN: ${{ github.token }}
run: |
wget -q --header "Authorization: token $TOKEN" -O /tmp/sources.tar.gz \
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/archive/${{ github.sha }}.tar.gz"
mkdir -p /tmp/sources && tar -xzf /tmp/sources.tar.gz -C /tmp/sources
ls /tmp/sources
cd /tmp/sources/*/
ruby .github/scripts/check-yaml.rb .gitea/workflows/*.yml deploy/docker/docker-compose.yml deploy/releases-repo/.github/ISSUE_TEMPLATE/*.yml