Workaround: manual checkout to bypass runner internal URL
build-image / Build & push (${{ matrix.platform }}) (linux/amd64) (push) Failing after 6s
Details
build-image / Build & push (${{ matrix.platform }}) (linux/amd64) (push) Failing after 6s
Details
This commit is contained in:
parent
b09d43fa87
commit
9d7058bf58
|
|
@ -49,8 +49,29 @@ jobs:
|
||||||
platform: [linux/amd64]
|
platform: [linux/amd64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
# Manual checkout that bypasses the runner's broken internal URL.
|
||||||
uses: actions/checkout@v4
|
# 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
|
- name: Compute tags
|
||||||
id: tags
|
id: tags
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue