Skip to content

Commit 02eb2fa

Browse files
bogdandinaclaude
andcommitted
fix(76471): fix shared workflow scripts checkout using hardcoded repo and workflow_sha
github.workflow_ref inside a reusable workflow returns the caller's workflow ref instead of the shared workflow's ref, causing the scripts checkout to target the wrong repository. Replace dynamic resolution with a hardcoded repository name and github.workflow_sha which correctly references the reusable workflow's commit SHA. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d640521 commit 02eb2fa

2 files changed

Lines changed: 4 additions & 13 deletions

File tree

.github/workflows/ci-cd-java.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,11 @@ jobs:
4343
clean: 'true'
4444
fetch-depth: 2
4545

46-
- name: Resolve shared workflow source
47-
env:
48-
WORKFLOW_REF: ${{ github.workflow_ref }}
49-
run: |
50-
SHARED_WORKFLOW_REPOSITORY="${WORKFLOW_REF%%/.github/workflows/*}"
51-
SHARED_WORKFLOW_REF="${WORKFLOW_REF##*@}"
52-
53-
echo "SHARED_WORKFLOW_REPOSITORY=${SHARED_WORKFLOW_REPOSITORY}" >> "$GITHUB_ENV"
54-
echo "SHARED_WORKFLOW_REF=${SHARED_WORKFLOW_REF}" >> "$GITHUB_ENV"
55-
5646
- name: Checkout shared workflow scripts
5747
uses: actions/checkout@v4
5848
with:
59-
repository: ${{ env.SHARED_WORKFLOW_REPOSITORY }}
60-
ref: ${{ env.SHARED_WORKFLOW_REF }}
49+
repository: HSLdevcom/transitdata-shared-workflows
50+
ref: ${{ github.workflow_sha }}
6151
path: .shared-workflows
6252

6353
- name: Setup JDK

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.idea
22
scripts/__pycache__
3-
/AGENTS.md
3+
AGENTS.md
4+
CLAUDE.md

0 commit comments

Comments
 (0)