Skip to content

Commit aecf80e

Browse files
committed
CI: support forks + naturalize pipeline URL
1 parent fd23a6c commit aecf80e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/start-gitlab.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
GITHUB_REPO: ${{ github.repository }}
2626
# The GitHub token for reporting status back
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
GITHUB_REPO_URL: ${{ github.event.pull_request.head.repo.clone_url }}
2829
run: |
2930
# --- Safety Checks ---
3031
# Ensure critical secrets are actually available (they should be with pull_request_target)

gitlab/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
--data @- <<EOF
2222
{
2323
"state": "pending",
24-
"target_url": "${CI_PIPELINE_URL}",
24+
"target_url": "https://blockstream.com",
2525
"description": "GitLab CI (${ARCH}) pipeline is running...",
2626
"context": "ci/gitlab/pipeline-status/${ARCH}"
2727
}
@@ -33,7 +33,7 @@
3333
--use \
3434
--platform linux/${ARCH}
3535
script:
36-
- git clone -b "$GITHUB_PR_REF" https://github.com/blockstream/esplora.git .
36+
- git clone -b "$GITHUB_PR_REF" "$GITHUB_PR_HEAD_REPO_URL" .
3737
# Make sure we test with the latest base image
3838
- docker pull "${IMAGE_BASE}:latest-${ARCH}" || true
3939
- |
@@ -81,7 +81,7 @@
8181
--data @- <<EOF
8282
{
8383
"state": "${FINAL_STATE}",
84-
"target_url": "${CI_PIPELINE_URL}",
84+
"target_url": "https://blockstream.com",
8585
"description": "${DESCRIPTION}",
8686
"context": "ci/gitlab/pipeline-status/${ARCH}"
8787
}

0 commit comments

Comments
 (0)