docs(gh-page): update baseURL config #575
This file contains 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
# Copyright 2023 The original authors | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
name: Docker Builds & Push | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- 'v*' | |
env: | |
JAVA_VERSION: '21' | |
JAVA_DISTRO: 'zulu' | |
GRAAL_VERSION: '21.0.1' | |
GRAAL_DISTRIBUTION: 'graalvm-community' | |
jobs: | |
build: | |
if: github.repository == 'streamthoughts/jikkou' | |
name: 'Build Docker Image' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v2 | |
- name: 'Set up GraalVM' | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
# version: ${{ env.GRAAL_VERSION }} | |
java-version: ${{ env.JAVA_VERSION }} | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
components: 'native-image' | |
native-image-job-reports: 'true' | |
native-image-musl: 'true' | |
- name: 'Login to DockerHub' | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: 'Set Docker Image Build-Args' | |
run: | | |
echo "VERSION=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.1.0:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | |
echo "GIT_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
echo "GIT_COMMIT=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV | |
echo "CREATED=$(date --rfc-3339=seconds)" >> $GITHUB_ENV | |
- name: 'Build Native Executable (Jikkou CLI)' | |
run: | | |
chmod +x ./mvnw && \ | |
./mvnw -ntp -B clean package -Pnative -Dgraalvm.build.arg="--static --libc=musl" -DskipTests && \ | |
cp ./jikkou-cli/target/jikkou-cli-${{ env.VERSION }}-runner ./docker/jikkou-cli-${{ env.VERSION }}-runner | |
- name: 'Build & Push to Docker Hub (Jikkou CLI)' | |
if: github.ref_name == 'main' | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
platforms: linux/amd64,linux/arm64 | |
file: docker/Dockerfile | |
no-cache: true | |
push: true | |
tags: streamthoughts/jikkou:main | |
build-args: | | |
VERSION=${{ env.VERSION }} | |
COMMIT=${{ env.GIT_COMMIT }} | |
BRANCH=${{ env.GIT_BRANCH }} | |
CREATED=${{ env.CREATED }} | |
- name: 'Build & Push to Docker Hub (Jikkou CLI)' | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: docker/build-push-action@v4 | |
with: | |
context: docker | |
platforms: linux/amd64,linux/arm64 | |
file: docker/Dockerfile | |
no-cache: true | |
push: true | |
tags: streamthoughts/jikkou:${{ env.VERSION }},streamthoughts/jikkou:latest | |
build-args: | | |
VERSION=${{ env.VERSION }} | |
COMMIT=${{ env.GIT_COMMIT }} | |
BRANCH=${{ env.GIT_BRANCH }} | |
CREATED=${{ env.CREATED }} | |
- name: 'Build & Push to Docker Hub (Jikkou API Server)' | |
if: github.ref_name == 'main' | |
run: | | |
./mvnw -ntp -B install -DskipTests && \ | |
./mvnw -ntp -B package -DskipTests -f ./jikkou-api/jikkou-api-server/pom.xml \ | |
-Dpackaging=docker \ | |
-Djib.to.image=streamthoughts/jikkou-api-server:main | |
docker image push --all-tags streamthoughts/jikkou-api-server | |
- name: 'Build & Push to Docker Hub (Jikkou API Server)' | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
./mvnw -ntp -B install -DskipTests && \ | |
./mvnw -ntp -B package -DskipTests -f ./jikkou-api/jikkou-api-server/pom.xml \ | |
-Dpackaging=docker \ | |
-Djib.to.image=streamthoughts/jikkou-api-server:${{ env.VERSION }} \ | |
-Djib.to.tags=latest | |
docker image push --all-tags streamthoughts/jikkou-api-server |