Skip to content

Commit

Permalink
bump: docker publish to 1.46.3 (#204)
Browse files Browse the repository at this point in the history
The 1.16.0 publish action does assume that images that are loaded are
tagged in a certian way. This is not guaranteed anymore and the newer
versions address this (i.e. just using the image name without a tag to
retag, though I have no idea how docker internally chooses what image to
use. Should not be an issue cuz only one image tag will be loaded
anyway)

It also required the addition of the login action to facilitate auth
against registries

---------

Co-authored-by: kubectl <[email protected]>
  • Loading branch information
DerTiedemann and 0xkubectl authored Jun 25, 2024
1 parent 653f8c3 commit 3485b11
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/java-gradle-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
description: "Publisher to prefix Docker image."
required: true
type: string
docker-registry:
description: "Host where the image should be pushed to."
required: false
type: string
default: "docker.io"
java-distribution:
description: "Java distribution to be installed. (Default is microsoft)"
required: false
Expand Down Expand Up @@ -144,12 +149,17 @@ jobs:
needs: build-jib

steps:
- name: Publish tarball image
uses: bakdata/ci-templates/actions/[email protected]
- name: Login into docker
uses: docker/login-action@v3
with:
publisher: ${{ inputs.docker-publisher }}
registry: ${{ inputs.docker-registry }}
username: ${{ secrets.docker-username }}
password: ${{ secrets.docker-password }}
- name: Publish tarball image
uses: bakdata/ci-templates/actions/[email protected]
with:
docker-registry: ${{ inputs.docker-registry }}
image-namespace: ${{ inputs.docker-publisher }}

release:
name: Create Github release
Expand Down
1 change: 1 addition & 0 deletions docs/workflows/java-gradle-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
| --------------------------- | ------- | -------- | ------------- | ------------------------------------------------------------------------------------------------- |
| docker-publisher | string | true | | Publisher to prefix Docker image. |
| docker-registry | string | false | `"docker.io"` | Host where the image should be pushed to. |
| gradle-cache | boolean | false | `true` | Whether Gradle caching is enabled or not. (Default is true) |
| gradle-cache-read-only | boolean | false | `false` | Whether Gradle caching should be read-only. Only used for build and test jobs. (Default is false) |
| gradle-refresh-dependencies | boolean | false | `false` | Whether Gradle should refresh dependencies. (Default is false) |
Expand Down

0 comments on commit 3485b11

Please sign in to comment.