From 9693221a84e1481a3e3800f2e5f833b617847fa1 Mon Sep 17 00:00:00 2001 From: Ian Pittwood Date: Fri, 21 Jul 2023 05:42:57 -0700 Subject: [PATCH] Use printf to get line sep build args --- .../actions/build-test-scan-push/action.yaml | 3 ++- .github/workflows/build-release.yaml | 1 + ci.Justfile | 18 +++++++++--------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/actions/build-test-scan-push/action.yaml b/.github/actions/build-test-scan-push/action.yaml index c9de2427e..6122a0ce3 100644 --- a/.github/actions/build-test-scan-push/action.yaml +++ b/.github/actions/build-test-scan-push/action.yaml @@ -81,7 +81,8 @@ runs: file: ${{ inputs.context }}/Dockerfile.${{ inputs.os }} cache-from: type=gha cache-to: type=gha - build-args: ${{ inputs.build-args }} + build-args: | + ${{ inputs.build-args }} tags: ${{ inputs.image-tags }} - name: Get first tag diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index 86da3b8c7..c0096f2de 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -63,6 +63,7 @@ jobs: os: ${{ matrix.os }} product: base image-tags: ${{ steps.get-tags.outputs.IMAGE_TAGS }} + push-image: ${{ github.ref == 'refs/heads/main' }} snyk-token: ${{ secrets.SNYK_TOKEN }} snyk-org-id: ${{ secrets.SNYK_ORG_ID }} ghcr-token: ${{ secrets.BUILD_PAT }} diff --git a/ci.Justfile b/ci.Justfile index 41d8be1bf..a3b6e8a3a 100644 --- a/ci.Justfile +++ b/ci.Justfile @@ -119,12 +119,12 @@ get-base-args $OS $TYPE="base" $BRANCH=`git branch --show`: else _DRIVERS_VERSION="{{ DRIVERS_VERSION }}" fi - echo R_VERSION="{{ R_VERSION }}" \ - R_VERSION_ALT="{{ R_VERSION_ALT }}" \ - PYTHON_VERSION="{{ PYTHON_VERSION }}" \ - PYTHON_VERSION_ALT="{{ PYTHON_VERSION_ALT }}" \ - DRIVERS_VERSION="${_DRIVERS_VERSION}" \ - SRC_IMAGE_NAME="${SRC_IMAGE_NAME}" + printf "R_VERSION={{ R_VERSION }} + R_VERSION_ALT={{ R_VERSION_ALT }} + PYTHON_VERSION={{ PYTHON_VERSION }} + PYTHON_VERSION_ALT={{ PYTHON_VERSION_ALT }} + DRIVERS_VERSION=${_DRIVERS_VERSION} + SRC_IMAGE_NAME=${SRC_IMAGE_NAME}" get-base-tags $OS $TYPE="base" $BRANCH=`git branch --show`: #!/usr/bin/env bash @@ -139,9 +139,9 @@ get-base-tags $OS $TYPE="base" $BRANCH=`git branch --show`: IMAGE_NAME="${IMAGE_NAME}-dev" fi - echo ghcr.io/rstudio/${IMAGE_NAME}:${OS},\ - ghcr.io/rstudio/${IMAGE_NAME}:${OS}-r{{R_VERSION}}-py{{PYTHON_VERSION}},\ - ghcr.io/rstudio/${IMAGE_NAME}:${OS}-r{{R_VERSION}}_{{R_VERSION_ALT}}-py{{PYTHON_VERSION}}_{{PYTHON_VERSION_ALT}} + printf "ghcr.io/rstudio/${IMAGE_NAME}:${OS}, + ghcr.io/rstudio/${IMAGE_NAME}:${OS}-r{{R_VERSION}}-py{{PYTHON_VERSION}}, + ghcr.io/rstudio/${IMAGE_NAME}:${OS}-r{{R_VERSION}}_{{R_VERSION_ALT}}-py{{PYTHON_VERSION}}_{{PYTHON_VERSION_ALT}}" # just BUILDX_PATH=~/.buildx test-base ubuntu1804 base test-base $OS $TYPE="base" $BRANCH=`git branch --show`: