Fix container image workflows

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2022-06-15 11:15:33 +02:00 committed by Daniel Weiße
parent 86d29a4567
commit 84ca9e3070
5 changed files with 23 additions and 8 deletions

View File

@ -4,6 +4,10 @@ inputs:
name:
description: 'Name of the micro-service'
required: true
projectVersion:
description: 'Version of the micro-service'
default: '0.0.0'
required: false
dockerfile:
description: 'Path to the services Dockerfile'
required: true
@ -14,6 +18,7 @@ inputs:
description: 'GitHub authorization token'
required: true
runs:
using: "composite"
steps:
@ -49,3 +54,5 @@ runs:
target: release
push: true
tags: ${{ steps.meta.outputs.tags }}
build-args: |
PROJECT_VERSION=${{ inputs.projectVersion }}

View File

@ -28,5 +28,6 @@ jobs:
uses: ./.github/actions/build_micro-service
with:
name: access-manager
projectVersion: '0.0.0'
dockerfile: access_manager/Dockerfile
github_token: ${{ secrets.GITHUB_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}

View File

@ -30,5 +30,6 @@ jobs:
uses: ./.github/actions/build_micro-service
with:
name: activation-service
projectVersion: '0.0.0'
dockerfile: activation/Dockerfile
github_token: ${{ secrets.GITHUB_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}

View File

@ -29,5 +29,6 @@ jobs:
uses: ./.github/actions/build_micro-service
with:
name: kmsserver
projectVersion: '0.0.0'
dockerfile: Dockerfile.kms
github_token: ${{ secrets.GITHUB_TOKEN }}
githubToken: ${{ secrets.GITHUB_TOKEN }}

View File

@ -11,11 +11,15 @@ on:
- 'activation-service'
- 'kmsserver'
required: true
default: 'access manager'
default: 'access-manager'
imageTag:
description: 'Container image tag'
required: true
default: 'manual-build'
version:
description: 'Version of the image to build'
required: true
default: '0.0.0'
jobs:
build-micro-service:
@ -32,11 +36,11 @@ jobs:
- name: Set Dockerfile variable
id: set-variable
run: |
case "${{ env.someVar }}" in
case "${{ inputs.microService }}" in
"access-manager" )
echo "microServiceDockerfile=access_manager/Dockerfile" >> $GITHUB_ENV ;;
"activation-service" )
echo "microServiceDockerfile=activation-service/Dockerfile" >> $GITHUB_ENV ;;
echo "microServiceDockerfile=activation/Dockerfile" >> $GITHUB_ENV ;;
"kmsserver" )
echo "microServiceDockerfile=Dockerfile.kms" >> $GITHUB_ENV ;;
esac
@ -46,6 +50,7 @@ jobs:
uses: ./.github/actions/build_micro-service
with:
name: ${{ inputs.microService }}
projectVersion: '0.0.0'
dockerfile: ${{ env.microServiceDockerfile }}
tag: ${{ inputs.imageTag }}
github_token: ${{ secrets.GITHUB_TOKEN }}
pushTag: ${{ inputs.imageTag }}
githubToken: ${{ secrets.GITHUB_TOKEN }}