Skip to content

Fetch the Docker release tag via GitHub CLI - #199

Merged
vharseko merged 2 commits into
OpenIdentityPlatform:masterfrom
vharseko:fix/docker-release-version-api
Nov 24, 2026
Merged

vharseko merged 2 commits into
OpenIdentityPlatform:masterfrom
vharseko:fix/docker-release-version-api

Conversation

@vharseko

@vharseko vharseko commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Use the latest release tag from OpenIdentityPlatform/OpenIG in the Docker build. Upstream runs read tag_name with gh api and the workflow token. Fork pushes use the same public release endpoint and keep their own image repository, so forks without published releases can still run the Docker smoke test.

Fail the version lookup step if the API request fails or the tag is missing or empty. In #198, an empty version reached the Docker smoke test and produced invalid reference format.

Validation

  • Ran the workflow step on Ubuntu 26.04 in upstream and fork contexts with a valid tag, HTTP 403, a missing tag, and an empty tag.
  • Confirmed that the live public lookup in the fork context returned 6.2.0 and set the image repository to vharseko/openig.
  • Passed mvn verify on JDK 11, actionlint, and git diff --check.

@vharseko vharseko added bug ci Build, CI/CD, and GitHub Actions changes docker Docker image and container changes labels Nov 23, 2026
@vharseko
vharseko requested a review from maximthomas November 23, 2026 16:33

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

praise: Reading tag_name directly and checking for an empty value keeps upstream lookup failures in the version step.


issue (blocking): Preserve Docker smoke tests for pushes in forks without published releases.

.github/workflows/build.yml:99

The base workflow reads the latest upstream release on every eligible push, which let an earlier features/** push in vharseko/OpenIG pass the lookup and Docker smoke test. HEAD reads releases from the repository running the workflow. GitHub currently returns HTTP 404 for the author's fork, so an eligible push with green Maven jobs now exits before Docker runs. Base lookup · Successful fork push

Keep the upstream release as the version source on fork pushes, using credentials that can read it or the public endpoint. GitHub scopes the workflow token to the repository that runs the workflow. An eligible push in a fork with no releases can reach Docker using the upstream version. Upstream runs still authenticate the API request and stop on API errors or an empty tag. Token scope · Latest release API

@vharseko
vharseko force-pushed the fix/docker-release-version-api branch from b80024a to 90ffe9a Compare November 24, 2026 06:22
@vharseko

Copy link
Copy Markdown
Member Author

@maximthomas I addressed the fork release lookup finding in 90ffe9ad. Both paths now read the latest release tag from OpenIdentityPlatform/OpenIG. Upstream runs authenticate with the workflow token. Fork pushes use the public endpoint and keep their own image repository.

I verified both paths on Ubuntu 26.04, including early failure on HTTP 403 and on missing or empty tags. The live fork lookup returned 6.2.0 and kept vharseko/openig as the image repository.

@vharseko
vharseko requested a review from maximthomas November 24, 2026 06:22

@maximthomas maximthomas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

praise: Quoting GITHUB_ENV keeps both exports reliable when the runner's environment file path contains spaces.

@vharseko
vharseko merged commit 4445a09 into OpenIdentityPlatform:master Nov 24, 2026
15 checks passed
@vharseko
vharseko deleted the fix/docker-release-version-api branch November 24, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug ci Build, CI/CD, and GitHub Actions changes docker Docker image and container changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants