From 57d9f013075e0bda680903f45dd7fd0f67b0b015 Mon Sep 17 00:00:00 2001 From: Igor Chuev Date: Thu, 25 Apr 2024 15:36:42 +0200 Subject: [PATCH] Allow passing arbitrary argument to docker build --- .github/workflows/build.yaml | 8 +++++++- build-push/action.yaml | 5 ++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 451680f..28f414e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -25,6 +25,11 @@ on: type: string default: '' description: 'Dockerfile target' + docker_build_args: + required: false + type: string + default: '' + description: 'Additional docker build args' secrets: API_TOKEN_GITHUB: @@ -49,7 +54,7 @@ jobs: token: ${{ secrets.API_TOKEN_GITHUB }} - name: Docker | Build and Push - uses: timescale/cloud-actions/build-push@main + uses: timescale/cloud-actions/build-push@allow-git-ssh with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} @@ -59,3 +64,4 @@ jobs: registry: ${{ inputs.registry }} target: ${{ inputs.docker_target }} file: ${{ inputs.dockerfile_path }} + docker-build-args: ${{ inputs.docker_build_args }} diff --git a/build-push/action.yaml b/build-push/action.yaml index ee2614b..e46863e 100644 --- a/build-push/action.yaml +++ b/build-push/action.yaml @@ -25,6 +25,9 @@ inputs: tags: description: 'List of tags' required: true + docker-build-args: + description: 'Additional argument to pass to docker build' + required: false runs: using: "composite" @@ -40,7 +43,7 @@ runs: - name: Docker Deps run: | - docker build -t ${{ inputs.registry }}:deps -f ${{ inputs.file }} . + docker build ${{ inputs.docker_build_args }} -t ${{ inputs.registry }}:deps -f ${{ inputs.file }} . shell: bash - name: Docker Build