diff --git a/.forgejo/workflows/probe.yml b/.forgejo/workflows/probe.yml index d9b6e65..eb3342d 100644 --- a/.forgejo/workflows/probe.yml +++ b/.forgejo/workflows/probe.yml @@ -3,24 +3,14 @@ on: push: branches: [ci/probe] jobs: - docker-label: + kaniko: runs-on: docker + container: + image: gcr.io/kaniko-project/executor:v1.23.2-debug steps: - - uses: actions/checkout@v4 - - name: Look around and write it down - env: - TOKEN: ${{ github.token }} + - name: Kaniko starts, and can read the repository by itself run: | - { - echo "label: docker"; uname -a; head -2 /etc/os-release - echo "node: $(node -v 2>&1)"; echo "npm: $(npm -v 2>&1)" - echo "docker: $(docker version --format '{{.Client.Version}} / server {{.Server.Version}}' 2>&1 | head -3)" - echo "git: $(git --version)"; echo "user: $(id -un)"; echo "socket: $(ls -la /var/run/docker.sock 2>&1)" - echo "buildx: $(docker buildx version 2>&1 | head -1)" - echo "server_url: ${{ github.server_url }}"; echo "repo: ${{ github.repository }}" - echo "cpus: $(nproc) mem: $(free -m | awk '/Mem/{print $2" MB"}') disk: $(df -h / | tail -1 | awk '{print $4" free"}')" - echo "registry reachable: $(curl -s -o /dev/null -w '%{http_code}' https://git.kmalloc.org/v2/)" - } > probe-result.txt 2>&1 - git config user.name probe; git config user.email probe@example.org - git add -f probe-result.txt && git commit -q -m "ci: probe result" || true - git push "https://x-access-token:${TOKEN}@git.kmalloc.org/squid/sonda.git" HEAD:refs/heads/ci/probe-result 2>&1 | tail -2 || true + /kaniko/executor version + echo "can reach the forge: $(wget -q -O /dev/null --spider https://git.kmalloc.org/squid/sonda && echo yes || echo no)" + echo "git clone context test:" + /kaniko/executor --no-push --dockerfile Dockerfile --context git://git.kmalloc.org/squid/sonda.git#refs/heads/main --target web --tar-path /tmp/web.tar --verbosity info 2>&1 | tail -5