Skip to content

Commit

Permalink
fix commit ref on main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
doosuu committed Aug 21, 2023
1 parent 7fad72a commit 8b92163
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,15 @@ jobs:

- name: Prepare .velocitas.json for integration test
run: |
NEW_CONFIG="$(jq --arg GITHUB_HEAD_REF "$GITHUB_HEAD_REF" '.packages[0].version |= $GITHUB_HEAD_REF' test/${{ matrix.language }}/.velocitas.json)"
COMMIT_REF=$GITHUB_SHA
if [ "$GITHUB_EVENT_NAME" = "pull_request" ];
then
echo "Running in context of a PR!"
COMMIT_REF=$GITHUB_HEAD_REF
fi
NEW_CONFIG="$(jq --arg COMMIT_REF "$COMMIT_REF" '.packages[0].version |= $COMMIT_REF' test/${{ matrix.language }}/.velocitas.json)"
echo "${NEW_CONFIG}" > test/${{ matrix.language }}/repo/.velocitas.json
- name: Init velocitas project
Expand Down

0 comments on commit 8b92163

Please sign in to comment.