-
Notifications
You must be signed in to change notification settings - Fork 0
feat: publish permissions plugin image #10
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Docker Build | ||
|
|
||
| # Publishes ghcr.io/groundsgg/plugin-permissions (edge on main, semver on tag). | ||
| # The image carries the shaded Velocity JAR at /jar/plugin.jar for the | ||
| # plugin-velocity-jar Helm chart. | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| tags: | ||
| - "v*" | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| packages: write | ||
| contents: write | ||
| actions: write | ||
|
|
||
| jobs: | ||
| reusable: | ||
| uses: groundsgg/.github/.github/workflows/docker-gradle-build-push.yml@main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # syntax=docker/dockerfile:1 | ||
| # | ||
| # Builds the plugin-permissions Velocity-plugin JAR and packages it for the | ||
| # platform-test environment. The output image carries the JAR at | ||
| # /jar/plugin.jar β the shape the `plugin-velocity-jar` Helm chart expects. | ||
| # | ||
| # Pushed as `ghcr.io/groundsgg/plugin-permissions:edge` (main) or with a | ||
| # semantic version tag by .github/workflows/docker-gradle-build-push.yml. | ||
|
|
||
| FROM eclipse-temurin:25-jdk AS build | ||
| WORKDIR /src | ||
|
|
||
| # GitHub Packages credentials for the Grounds Gradle convention plugins. | ||
| # The token is supplied as a BuildKit secret so it is not stored in a layer. | ||
| ARG GITHUB_USER | ||
|
|
||
| COPY gradle/ gradle/ | ||
| COPY gradlew settings.gradle.kts build.gradle.kts ./ | ||
|
|
||
| COPY common/ common/ | ||
| COPY minestom/ minestom/ | ||
| COPY velocity/ velocity/ | ||
|
|
||
| RUN --mount=type=secret,id=github_token,required=true \ | ||
| /bin/sh -euc '\ | ||
| : "${GITHUB_USER:?GITHUB_USER build arg is required}"; \ | ||
| token="$(cat /run/secrets/github_token)"; \ | ||
| ./gradlew --no-daemon :velocity:build \ | ||
| -Pgithub.user="${GITHUB_USER}" \ | ||
| -Pgithub.token="${token}" \ | ||
| ' | ||
|
|
||
| RUN mkdir -p /out && \ | ||
| cp "$(ls -S /src/velocity/build/libs/*.jar | head -n1)" /out/plugin.jar | ||
|
|
||
| FROM alpine:3 | ||
| RUN mkdir -p /jar | ||
| COPY --from=build /out/plugin.jar /jar/plugin.jar | ||
| # No ENTRYPOINT: the plugin-velocity-jar chart copies the JAR from this image. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This Gradle invocation never receives
versionOverride; withgg.grounds.base-conventions0.6.0,project.versiondefaults tolocal-SNAPSHOTunless that property is set, and the Velocity conventions bakeproject.versionintoBuildInfo.VERSION. Onv*image releases, GHCR will get a semver tag but the JAR's Velocity plugin metadata and permission-catalog source version will still belocal-SNAPSHOT, so the tag version needs to be passed into the Docker build and then into this Gradle command.Useful? React with πΒ / π.