Skip to content

Publish sample docker images #2

Publish sample docker images

Publish sample docker images #2

name: Publish sample docker images
on:
workflow_dispatch:
workflow_run:
workflows: [ Publish ]
types:
- completed
permissions:
contents: read
jobs:
publish-sample-images:
name: Build and publish sample docker images
runs-on: ubuntu-22.04
if: github.event.repository.fork == false
steps:
- name: Checkout
# https://github.com/actions/checkout/releases
# v4.1.1
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
with:
# we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves
fetch-depth: 0
- name: Cache Coursier cache
# https://github.com/coursier/cache-action/releases
# v6.4.5
uses: coursier/cache-action@1ff273bff02a8787bc9f1877d347948af647956d
- name: Set up JDK 21
# https://github.com/coursier/setup-action/releases
# v1.3.5
uses: coursier/setup-action@7bde40eee928896f074dbb76d22dd772eed5c65f
with:
jvm: temurin:1.21
- name: Update SDK version
id: update_sdk_version
run: |-
# use latest tag
docs/bin/version.sh > ~/akka-javasdk-version.txt
export SDK_VERSION="$(cat ~/akka-javasdk-version.txt)"
echo "SDK version: '${SDK_VERSION}'"
./updateSdkVersions.sh java samples/shopping-cart-quickstart
- name: Quickstart docker image for console quick-deploy
env:
PUBLIC_GCR_SERVICE_KEY: ${{ secrets.PUBLIC_GCR_SERVICE_KEY }}
run: |-
cd samples/shopping-cart-quickstart
echo "$PUBLIC_GCR_SERVICE_KEY" | docker login -u _json_key --password-stdin https://gcr.io
mvn --batch-mode deploy docker:push -DskipTests -Ddocker.image=gcr.io/kalix-public/samples/shopping-cart-quickstart