From 20f5d19f2f4b6132706858ffd4acdfe096403c67 Mon Sep 17 00:00:00 2001 From: Rob Date: Fri, 12 Jul 2024 23:25:07 +0200 Subject: [PATCH] Added job folder --- job/build-docker-image/action.yaml | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 job/build-docker-image/action.yaml diff --git a/job/build-docker-image/action.yaml b/job/build-docker-image/action.yaml new file mode 100644 index 0000000..739c6f0 --- /dev/null +++ b/job/build-docker-image/action.yaml @@ -0,0 +1,42 @@ +name: Build docker image + +on: + workflow_call: + inputs: + major-version: + required: true + type: number + minor-version: + required: true + type: number + revision-version: + required: true + type: number + image-name: + required: true + type: string + dockerfile: + type: string + default: Dockerfile + workspace-path: + type: string + required: true + +jobs: + build-image: + + steps: + - name: Checkout main + uses: actions/checkout@v4 + + - name: Kaniko build + uses: aevea/action-kaniko@master + with: + path: ${{ input.workspace-path }} + build_file: ${{ input.dockerfile }} + image: ${{ input.image-name }} + registry: ${{ vars.GLOBAL_REGISTRY_URL }} + username: ${{ secrets.REGISTRY_USER }} + password: ${{ secrets.REGISTRY_TOKEN }} + tag: ${{ input.major }}.${{ input.minor }}.${{ input.revision }} + cache: true \ No newline at end of file