Skip to content

feat(docker-publish): pure Docker build + gradle-docker-context producer#15

Merged
TheMeinerLP merged 1 commit into
mainfrom
feat/docker-publish-maven-creds
Jun 21, 2026
Merged

feat(docker-publish): pure Docker build + gradle-docker-context producer#15
TheMeinerLP merged 1 commit into
mainfrom
feat/docker-publish-maven-creds

Conversation

@TheMeinerLP

@TheMeinerLP TheMeinerLP commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Goal

Separate the Gradle toolchain from the Docker build so docker-publish.yml is a pure, generic Docker build usable by any project (Flutter, Node, Go, plain multi-stage Dockerfiles) — not just Gradle-produced contexts.

Changes

docker-publish.yml — now pure

  • Removed all JDK/Gradle steps and the build-command / build-env / setup-java / java-version / java-distribution inputs.
  • Added artifact-name: optionally download a pre-built context (uploaded by an upstream job in the same run) into context before building.
  • Context source is now either the checked-out repo (self-contained Dockerfile) or an artifact. No language/build step remains.

gradle-docker-context.yml — new reusable producer

  • Sets up JDK + Gradle, exposes the private OneLiteFeather Maven credentials as env (same convention as gradle-publish.yml).
  • Runs a gradle-command (e.g. ./gradlew jar optimizedBuildLayers optimizedDockerfile -Pversion=$VERSION) to generate the Docker context.
  • Uploads context-path as an artifact for docker-publish to consume.

Caller pattern

build-context:
  uses: OneLiteFeatherNET/workflows/.github/workflows/gradle-docker-context.yml@v2.3.0
  with:
    version: "1.2.3"
    gradle-command: "./gradlew jar optimizedBuildLayers optimizedDockerfile -Pversion=$VERSION"
    context-path: "build/docker/optimized"
    artifact-name: "docker-context-1.2.3"
  secrets: inherit

docker:
  needs: build-context
  uses: OneLiteFeatherNET/workflows/.github/workflows/docker-publish.yml@v2.3.0
  with:
    image-name: "onelitefeather/foo"
    version: "1.2.3"
    context: "build/docker/optimized"
    artifact-name: "docker-context-1.2.3"
  secrets: inherit

Non-Gradle (e.g. Flutter, multi-stage Dockerfile) skips the producer entirely:

docker:
  uses: OneLiteFeatherNET/workflows/.github/workflows/docker-publish.yml@v2.3.0
  with:
    image-name: "onelitefeather/foo"
    version: "1.2.3"
    context: "./"
  secrets: inherit

⚠️ Breaking

docker-publish.yml drops setup-java / build-command / build-env. Callers using those (Otis, Vulpes-Backend) are migrated to the producer pattern in their own PRs and must move together with the v2.3.0 bump.

🤖 Generated with Claude Code

@TheMeinerLP TheMeinerLP force-pushed the feat/docker-publish-maven-creds branch from c1498ce to e4f8bb6 Compare June 21, 2026 16:00
@TheMeinerLP TheMeinerLP changed the title feat(docker-publish): pass OneLiteFeather Maven credentials to build-command feat(docker-publish): generic build-env for build-command (toolchain-agnostic) Jun 21, 2026
…xt producer

Separate the Gradle toolchain from the Docker build so docker-publish.yml
can build any project (Flutter, Node, Go, plain multi-stage Dockerfiles),
not just Gradle-produced contexts.

- docker-publish.yml: drop all JDK/Gradle steps and the build-command /
  build-env / setup-java inputs. The context now comes either from the
  checked-out repo or from a pre-built artifact via the new `artifact-name`
  input (downloaded into `context` before the build). No language/build
  step remains here.
- Add gradle-docker-context.yml: a reusable producer that sets up JDK +
  Gradle (with the private OneLiteFeather Maven credentials, like
  gradle-publish.yml), runs a Gradle command to generate the Docker
  context (e.g. Micronaut optimizedDockerfile), and uploads it as an
  artifact for docker-publish to consume in the same run.

Callers (Otis, Vulpes-Backend) chain the producer into docker-publish.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@TheMeinerLP TheMeinerLP force-pushed the feat/docker-publish-maven-creds branch from e4f8bb6 to bf1636f Compare June 21, 2026 16:20
@TheMeinerLP TheMeinerLP changed the title feat(docker-publish): generic build-env for build-command (toolchain-agnostic) feat(docker-publish): pure Docker build + gradle-docker-context producer Jun 21, 2026
@TheMeinerLP TheMeinerLP merged commit 7c9f397 into main Jun 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant