Skip to content

Commit a2c11f1

Browse files
committed
[ci] diversified external CI selects a valid branch
we need to check existence of a remote branch with refs/heads (otherwise, we would accept partial matches), but checkout without.
1 parent e553ce9 commit a2c11f1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ jobs:
124124
with:
125125
path: easycrypt
126126
- name: Extract target branch name
127-
run: echo "branch=refs/heads/merge-${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
127+
run: echo "branch=merge-${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
128128
id: extract_branch
129129
- name: Find remote branch
130130
id: branch_name
131131
run: |
132-
git ls-remote --exit-code --heads ${{ matrix.target.repository }} ${{ steps.extract_branch.outputs.branch }} || exists=$?
132+
git ls-remote --exit-code --heads ${{ matrix.target.repository }} refs/heads/${{ steps.extract_branch.outputs.branch }} || exists=$?
133133
if [ "$exists" = "2" ];
134134
then echo "REPO_BRANCH=${{ matrix.target.branch }}" >> $GITHUB_OUTPUT;
135135
else echo "REPO_BRANCH=${{ steps.extract_branch.outputs.branch }}" >> $GITHUB_OUTPUT;

0 commit comments

Comments
 (0)