Skip to content

build-push-jumanpp-knp-kwja #60

build-push-jumanpp-knp-kwja

build-push-jumanpp-knp-kwja #60

name: build-push-jumanpp-knp-kwja
# DO NOT trigger on pull requests for security reasons
on:
schedule:
- cron: '0 20 */16 * *' # Runs at 20:00 UTC on the 1 and 17th of every month.
workflow_dispatch:
env:
registry-user: kunlp
kwja-version: 2.3.0
jobs:
build-push-jumanpp:
runs-on: self-hosted
strategy:
max-parallel: 4
fail-fast: false
matrix:
base-image: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04", "debian:bullseye"]
include:
- base-image: "ubuntu:20.04"
tag: "ubuntu20.04"
- base-image: "ubuntu:22.04"
tag: "ubuntu22.04"
- base-image: "ubuntu:24.04"
tag: "ubuntu24.04"
- base-image: "debian:bullseye"
tag: "debian11"
steps:
- name: Generate tags
id: generate-tags
# jumanpp:latest is excluded because there is another alpine-based image
run: |
tag_prefix="${{ env.registry-user }}/jumanpp"
tags="${tag_prefix}:${{ matrix.tag }}"
if [[ ${{ matrix.base-image }} == 'ubuntu:24.04' ]]; then
tags+=",${tag_prefix}:ubuntu"
fi
echo "tags=${tags}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- uses: ./.github/actions/build-push-image
with:
registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
dockerfile: jumanpp.dockerfile
build-args: |
BASE_IMAGE=${{ matrix.base-image }}
tags: ${{ steps.generate-tags.outputs.tags }}
build-push-kwja:
runs-on: self-hosted
strategy:
max-parallel: 3
fail-fast: false
matrix:
base-image: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04", "debian:bullseye"]
include:
- base-image: "ubuntu:20.04"
tag: "ubuntu20.04"
- base-image: "ubuntu:22.04"
tag: "ubuntu22.04"
- base-image: "ubuntu:24.04"
tag: "ubuntu24.04"
- base-image: "debian:bullseye"
tag: "debian11"
steps:
- name: Generate tags
id: generate-tags
run: |
tag_prefix="${{ env.registry-user }}/kwja"
tags="${tag_prefix}:${{ matrix.tag }}"
if [[ ${{ matrix.base-image }} == 'ubuntu:24.04' ]]; then
tags+=",${tag_prefix}:ubuntu,${tag_prefix}:latest"
fi
echo "tags=${tags}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- uses: ./.github/actions/build-push-image
with:
registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
dockerfile: kwja.dockerfile
build-args: |
BASE_IMAGE=${{ matrix.base-image }}
KWJA_VERSION=${{ env.kwja-version }}
tags: ${{ steps.generate-tags.outputs.tags }}
build-push-jumanpp-knp:
needs: build-push-jumanpp
runs-on: self-hosted
strategy:
max-parallel: 2
fail-fast: false
matrix:
base-image: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
include:
- base-image: "ubuntu:20.04"
tag: "ubuntu20.04"
- base-image: "ubuntu:22.04"
tag: "ubuntu22.04"
- base-image: "ubuntu:24.04"
tag: "ubuntu24.04"
steps:
- id: generate-tags
run: |
tag_prefix="${{ env.registry-user }}/jumanpp-knp"
tags="${tag_prefix}:${{ matrix.tag }}"
if [[ ${{ matrix.base-image }} == 'ubuntu:24.04' ]]; then
tags+=",${tag_prefix}:ubuntu,${tag_prefix}:latest"
fi
echo "tags=${tags}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- uses: ./.github/actions/build-push-image
with:
registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
dockerfile: jumanpp-knp.dockerfile
build-args: |
BASE_IMAGE_JUMANPP=${{ env.registry-user }}/jumanpp:${{ matrix.tag }}
BASE_IMAGE=${{ matrix.base-image }}
tags: ${{ steps.generate-tags.outputs.tags }}
build-push-jumanpp-kwja:
needs: [build-push-jumanpp, build-push-kwja]
runs-on: self-hosted
strategy:
max-parallel: 2
fail-fast: false
matrix:
base-image: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
include:
- base-image: "ubuntu:20.04"
tag: "ubuntu20.04"
- base-image: "ubuntu:22.04"
tag: "ubuntu22.04"
- base-image: "ubuntu:24.04"
tag: "ubuntu24.04"
steps:
- id: generate-tags
run: |
tag_prefix="${{ env.registry-user }}/jumanpp-kwja"
tags="${tag_prefix}:${{ matrix.tag }}"
if [[ ${{ matrix.base-image }} == 'ubuntu:24.04' ]]; then
tags+=",${tag_prefix}:ubuntu,${tag_prefix}:latest"
fi
echo "tags=${tags}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- uses: ./.github/actions/build-push-image
with:
registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
dockerfile: jumanpp-kwja.dockerfile
build-args: |
BASE_IMAGE_JUMANPP=${{ env.registry-user }}/jumanpp:${{ matrix.tag }}
BASE_IMAGE_KWJA=${{ env.registry-user }}/kwja:${{ matrix.tag }}
tags: ${{ steps.generate-tags.outputs.tags }}
build-push-jumanpp-knp-kwja:
needs: [build-push-jumanpp-knp, build-push-kwja]
runs-on: self-hosted
strategy:
max-parallel: 2
fail-fast: false
matrix:
base-image: ["ubuntu:20.04", "ubuntu:22.04", "ubuntu:24.04"]
include:
- base-image: "ubuntu:20.04"
tag: "ubuntu20.04"
- base-image: "ubuntu:22.04"
tag: "ubuntu22.04"
- base-image: "ubuntu:24.04"
tag: "ubuntu24.04"
steps:
- id: generate-tags
run: |
tag_prefix="${{ env.registry-user }}/jumanpp-knp-kwja"
tags="${tag_prefix}:${{ matrix.tag }}"
if [[ ${{ matrix.base-image }} == 'ubuntu:24.04' ]]; then
tags+=",${tag_prefix}:ubuntu,${tag_prefix}:latest"
fi
echo "tags=${tags}" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- uses: ./.github/actions/build-push-image
with:
registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
dockerfile: jumanpp-knp-kwja.dockerfile
build-args: |
BASE_IMAGE_JUMANPP_KNP=${{ env.registry-user }}/jumanpp-knp:${{ matrix.tag }}
BASE_IMAGE_KWJA=${{ env.registry-user }}/kwja:${{ matrix.tag }}
tags: ${{ steps.generate-tags.outputs.tags }}