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

GH action builds in custom tags or in 'latest' branch always use nightly builds #512

Open
mposolda opened this issue Nov 21, 2023 · 1 comment
Labels
Milestone

Comments

@mposolda
Copy link
Contributor

Describe the bug

For example when looking at the quickstart tag for 22.0.5 [1] and corresponding build [2], I can see that in Get Keycloak step, it mentions:

Downloading nightly Keycloak release

This is not correct as the tag should use Keycloak 22.0.5 tag instead of the nightly Keycloak release. Same issue exists for example for latest branch. Only main branch should use nightly Keycloak release.

[1] https://github.com/keycloak/keycloak-quickstarts/tree/22.0.5
[2] https://github.com/keycloak/keycloak-quickstarts/actions/runs/6625526057/job/17996668081

Cause

It looks there are some mistakes in prepare-local-server.sh and run-tests.sh scripts. Namely in checks like this:

if [[ ( -n "$GITHUB_BASE_REF" &&  "$GITHUB_BASE_REF" == "latest" ) ]] || [[ ( -n "$QUICKSTART_BRANCH" && "$QUICKSTART_BRANCH" != "main" ) ]]; then
 ... do something here ...

When running the GH actions build, The QUICKSTART_BRANCH is not set. And the variable GITHUB_BASE_REF is set only when running the PR build (According to [3]). When running the manually triggered build (or nightly build) with latest branch, it doesn't work as GITHUB_BASE_REF is not set. Also it doesn't work with any tag builds.

[3] https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables

Version

22.0.5

Expected behavior

The non-PR builds triggered on latest branch or on tags should use proper Keycloak server version instead of the "nightly". Should be fixed in both prepare-local-server.sh and run-tests.sh.

Actual behavior

GH actions are always using nightly Keycloak build. Only exception is when someone send PR against latest branch (which people should not do anyway).

How to Reproduce?

No response

Anything else?

No response

@mposolda
Copy link
Contributor Author

Adding to 24 for now. Will be nice if we fix it, but strictly a blocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant