Skip to content

CI - Images

CI - Images #17

Workflow file for this run

name: CI - Images
on:
workflow_dispatch:
inputs:
version:
type: string
description: 'Version to build'
required: false
delete-tags:
required: false
type: boolean
default: false
description: 'Delete the image tags'
jobs:
prepare:
name: Prepare Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
if: ${{ inputs.version == null || inputs.version == '' }}
- uses: actions/setup-java@v3
if: ${{ inputs.version == null || inputs.version == '' }}
with:
java-version: '8'
distribution: 'liberica'
- name: Version from POM
if: ${{ inputs.version == null || inputs.version == '' }}
shell: bash
run: echo "VERSIONS=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Version from Input
if: ${{ inputs.version != null && inputs.version != '' }}
shell: bash
run: echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
outputs:
version: ${{ env.VERSION }}
images:
name: Build and Publish Images
needs: [ prepare ]
uses: ./.github/workflows/build-images.yml
with:
version: ${{ needs.prepare.outputs.version }}
delete-tags: ${{ inputs.delete-tags == 'true' }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GCR_JSON_KEY: ${{ secrets.GCR_JSON_KEY }}