Workaround: manual checkout to bypass runner internal URL
build-image / Build & push (${{ matrix.platform }}) (linux/amd64) (push) Failing after 6s Details

This commit is contained in:
Khalaf 2026-05-10 01:31:54 +04:00
parent b09d43fa87
commit 9d7058bf58
1 changed files with 23 additions and 2 deletions

View File

@ -49,8 +49,29 @@ jobs:
platform: [linux/amd64]
steps:
- name: Checkout
uses: actions/checkout@v4
# Manual checkout that bypasses the runner's broken internal URL.
# The runner's `instance` is configured as http://forgejo:3000 which it
# cannot resolve, so actions/checkout@v4 fails. We clone from the
# public URL directly using REGISTRY_TOKEN for auth.
- name: Checkout (manual workaround for runner internal URL)
shell: bash
env:
TOKEN: ${{ secrets.REGISTRY_TOKEN }}
REPO: ${{ gitea.repository }}
SHA: ${{ gitea.sha }}
run: |
set -eo pipefail
# Don't echo the token-bearing URL into logs
set +x
REMOTE="https://mkm1971:${TOKEN}@cgi.medsys.cloud/${REPO}.git"
git init -q .
git remote add origin "$REMOTE"
git fetch --depth=1 origin "${SHA:-main}"
git checkout -q FETCH_HEAD
# Scrub the credential out of the remote so later steps can't leak it
git remote set-url origin "https://cgi.medsys.cloud/${REPO}.git"
set -x
git log --oneline -1
- name: Compute tags
id: tags