Skip to content

Commit fbebdb9

Browse files
committed
fix: specify branch reference for changelog workflow execution
1 parent 52f2776 commit fbebdb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/prepare-tag.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
fi
7474
7575
gh workflow run changelog.yml \
76-
--repo codesnippetspro/.github-private \
76+
--repo codesnippetspro/.github-private --ref main \
7777
--field repo="${{ github.repository }}" \
7878
--field branch="${{ github.ref_name }}" \
7979
--field version="${{ needs.version.outputs.tag }}" \
@@ -109,13 +109,13 @@ jobs:
109109
fi
110110
111111
# Get the latest run for this workflow with error handling
112-
if ! status=$(gh run list --workflow changelog.yml --limit 1 --json status -q '.[0].status' --repo "$target_repo" 2>/dev/null); then
112+
if ! status=$(gh run list --workflow changelog.yml --limit 1 --json status -q '.[0].status' --repo "$target_repo" --ref main 2>/dev/null); then
113113
echo "::warning::Attempt $attempt/$max_attempts: Could not find workflow '$workflow_name' or no runs exist yet. Checking again..."
114114
sleep 10
115115
continue
116116
fi
117117
118-
if ! conclusion=$(gh run list --workflow changelog.yml --limit 1 --json conclusion -q '.[0].conclusion' --repo "$target_repo" 2>/dev/null); then
118+
if ! conclusion=$(gh run list --workflow changelog.yml --limit 1 --json conclusion -q '.[0].conclusion' --repo "$target_repo" --ref main 2>/dev/null); then
119119
echo "::warning::Attempt $attempt/$max_attempts: Could not get conclusion for workflow '$workflow_name'. Checking again..."
120120
sleep 10
121121
continue

0 commit comments

Comments
 (0)