release #109
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
name: release | |
on: | |
workflow_dispatch: | |
inputs: | |
killbill_version: | |
description: 'killbill version' | |
required: false | |
default: '' | |
kaui_version: | |
description: 'kaui version' | |
required: false | |
default: '' | |
cloud_version: | |
description: 'killbill-cloud version' | |
required: true | |
default: 'master' | |
nexus_repository: | |
description: 'Nexus repository for KPM' | |
required: true | |
default: 'releases' | |
snapshot_only: | |
description: 'whether to push snapshots' | |
required: true | |
default: false | |
type: boolean | |
env: | |
CURRENT_LTS: '0.24' | |
jobs: | |
docker: | |
name: Publish Docker images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push killbill/base:latest | |
run: | | |
if [[ ${{ github.event.inputs.snapshot_only }} = "true" ]]; then | |
TAG="killbill/base:latest-$(git rev-parse --short "$GITHUB_SHA")" | |
else | |
TAG="killbill/base:latest" | |
fi | |
cd docker/templates/base/latest | |
docker buildx build --push --platform=linux/arm64,linux/amd64 --no-cache -t $TAG -f Dockerfile --build-arg KILLBILL_CLOUD_VERSION=${{ github.event.inputs.cloud_version }} --build-arg NEXUS_REPOSITORY=${{ github.event.inputs.nexus_repository }} . | |
- name: Build and push latest images | |
run: | | |
cd docker | |
if [[ ${{ github.event.inputs.snapshot_only }} = "true" ]]; then | |
make -e TARGET=kaui -e PARENT_VERSION=latest-$(git rev-parse --short "$GITHUB_SHA") -e VERSION=latest -e IMAGE=killbill/kaui:latest-$(git rev-parse --short "$GITHUB_SHA") multi-arch | |
make -e TARGET=killbill -e PARENT_VERSION=latest-$(git rev-parse --short "$GITHUB_SHA") -e VERSION=latest -e IMAGE=killbill/killbill:latest-$(git rev-parse --short "$GITHUB_SHA") multi-arch | |
else | |
make -e TARGET=kaui -e VERSION=latest multi-arch | |
make -e TARGET=killbill -e VERSION=latest multi-arch | |
make -e TARGET=mariadb VERSION=$CURRENT_LTS multi-arch | |
make -e TARGET=postgresql VERSION=$CURRENT_LTS multi-arch | |
fi | |
- name: Build and push killbill image | |
if: github.event.inputs.killbill_version != '' | |
run: | | |
cd docker | |
if [[ ${{ github.event.inputs.snapshot_only }} = "true" ]]; then | |
make -e TARGET=killbill -e PARENT_VERSION=latest-$(git rev-parse --short "$GITHUB_SHA") -e VERSION=${{ github.event.inputs.killbill_version }} -e IMAGE=killbill/killbill:${{ github.event.inputs.killbill_version }}-$(git rev-parse --short "$GITHUB_SHA") multi-arch | |
else | |
make -e TARGET=killbill -e VERSION=${{ github.event.inputs.killbill_version }} multi-arch | |
fi | |
- name: Build and push kaui image | |
if: github.event.inputs.kaui_version != '' | |
run: | | |
cd docker | |
if [[ ${{ github.event.inputs.snapshot_only }} = "true" ]]; then | |
make -e TARGET=kaui -e PARENT_VERSION=latest-$(git rev-parse --short "$GITHUB_SHA") -e VERSION=${{ github.event.inputs.kaui_version }} -e IMAGE=killbill/kaui:${{ github.event.inputs.kaui_version }}-$(git rev-parse --short "$GITHUB_SHA") multi-arch | |
else | |
make -e TARGET=kaui -e VERSION=${{ github.event.inputs.kaui_version }} multi-arch | |
fi |