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

ci: fix checking github.event.pull_request.head.sha #26775

Merged

Conversation

mhofstetter
Copy link
Member

Currently, checks like if [ ${{ github.event.pull_request.head.sha }} != "" ]; then are resulting in errors ([: !=: unary operator expected) if the variable is empty. This is the case if the workflow is triggered via push on main (and not via pull_request).

This commit fixes this by wrapping it with a string.

Currently, checks like `if [ ${{ github.event.pull_request.head.sha }}
!= "" ]; then` are resulting in errors (`[: !=: unary operator
expected`) if the variable is empty.

This commit fixes this by wrapping it with a string.

Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
@mhofstetter mhofstetter requested review from a team as code owners July 12, 2023 07:55
@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jul 12, 2023
@mhofstetter mhofstetter added kind/bug This is a bug in the Cilium logic. area/CI Continuous Integration testing issue or flake release-note/misc This PR makes changes that have no direct user impact. labels Jul 12, 2023
@maintainer-s-little-helper maintainer-s-little-helper bot removed dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Jul 12, 2023
Copy link
Contributor

@viktor-kurchenko viktor-kurchenko left a comment

Choose a reason for hiding this comment

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

LGTM.

@mhofstetter
Copy link
Member Author

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jul 12, 2023
@julianwiedmann julianwiedmann added release-note/ci This PR makes changes to the CI. kind/bug/CI This is a bug in the testing code. and removed release-note/misc This PR makes changes that have no direct user impact. kind/bug This is a bug in the Cilium logic. labels Jul 13, 2023
@julianwiedmann julianwiedmann merged commit ff37a76 into cilium:main Jul 13, 2023
66 checks passed
@mhofstetter mhofstetter deleted the pr/mhofstetter/fix-pr-sha-access branch July 13, 2023 06:54
@julianwiedmann julianwiedmann added the needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch label Mar 16, 2024
@gandro gandro mentioned this pull request Mar 19, 2024
10 tasks
@gandro gandro added backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. and removed needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Mar 19, 2024
@github-actions github-actions bot added backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. and removed backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. labels Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/CI Continuous Integration testing issue or flake backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. kind/bug/CI This is a bug in the testing code. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants