diff --git a/.github/actions/build_micro-service/action.yml b/.github/actions/build_micro-service/action.yml index 27c5a2e5f..ba72af084 100644 --- a/.github/actions/build_micro-service/action.yml +++ b/.github/actions/build_micro-service/action.yml @@ -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 @@ -13,6 +17,7 @@ inputs: githubToken: description: 'GitHub authorization token' required: true + runs: using: "composite" @@ -49,3 +54,5 @@ runs: target: release push: true tags: ${{ steps.meta.outputs.tags }} + build-args: | + PROJECT_VERSION=${{ inputs.projectVersion }} diff --git a/.github/workflows/build-access-manager-image.yml b/.github/workflows/build-access-manager-image.yml index 1ec6d819e..f0f35030f 100644 --- a/.github/workflows/build-access-manager-image.yml +++ b/.github/workflows/build-access-manager-image.yml @@ -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 }} diff --git a/.github/workflows/build-activation-image.yml b/.github/workflows/build-activation-image.yml index eea90289c..386fc7ec4 100644 --- a/.github/workflows/build-activation-image.yml +++ b/.github/workflows/build-activation-image.yml @@ -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 }} diff --git a/.github/workflows/build-kms-image.yml b/.github/workflows/build-kms-image.yml index 4261cf917..c86f67fa0 100644 --- a/.github/workflows/build-kms-image.yml +++ b/.github/workflows/build-kms-image.yml @@ -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 }} diff --git a/.github/workflows/build-micro-service-manual.yml b/.github/workflows/build-micro-service-manual.yml index a5f7a9f79..1d2a46693 100644 --- a/.github/workflows/build-micro-service-manual.yml +++ b/.github/workflows/build-micro-service-manual.yml @@ -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 }}