Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os-extension-test: fix checkout ref #210

Merged
merged 3 commits into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/os-extension-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ jobs:
needs: build
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
Copy link
Contributor Author

@adangel adangel May 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to use ${{ github.ref }} only - the difference is, that "github.event.pull_request.head.sha" is the head commit of the PR, but "github.ref" will be the "pull request merge branch" - that is a temporary merge of the PR into main. This is usually, what we want, as we want to test the integration of the PR with the main branch. Otherwise we might merge the PR but the project will be broken, because the merged PR was never tested.

If this is changed here, then it must also be changed on line 42.


- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
Expand Down