From e05b6903ecf498743952cd2830798fff9c8a7c64 Mon Sep 17 00:00:00 2001 From: Rahul De Date: Sun, 3 Jan 2021 14:53:52 +0100 Subject: [PATCH] [#699] Remove redundant checks for snapshot, fix actions build --- .circleci/script/docker | 6 ++---- .github/script/docker | 11 ++++------- .github/workflows/build.yml | 2 +- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.circleci/script/docker b/.circleci/script/docker index 957b50fd9..6291560e3 100755 --- a/.circleci/script/docker +++ b/.circleci/script/docker @@ -30,10 +30,8 @@ if [ -z "$CIRCLE_PULL_REQUEST" ] && [ "$CIRCLE_BRANCH" = "master" ]; then if [ "false" = "$snapshot" ]; then echo "Pushing image $image_name:$latest_tag" docker push "$image_name:$latest_tag" - if [[ $snapshot == "false" ]]; then - echo "Pushing image $image_name:alpine" - docker push "$image_name:alpine" - fi + echo "Pushing image $image_name:alpine" + docker push "$image_name:alpine" fi # we update the version tag, even if it's a SNAPSHOT version echo "Pushing image $image_name:$image_tag" diff --git a/.github/script/docker b/.github/script/docker index a763ea64e..e005334e3 100755 --- a/.github/script/docker +++ b/.github/script/docker @@ -19,12 +19,11 @@ if [ -z "$GITHUB_HEAD_REF" ] && [ "${GITHUB_REF##*/}" = "master" ] then echo "Building Docker image $image_name:$image_tag" echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USER" --password-stdin - unzip "/tmp/release/babashka-${image_tag}-linux-amd64.zip" + mv /tmp/release/bb . docker build -t "$image_name" -f Dockerfile.ci . docker tag "$image_name:$latest_tag" "$image_name:$image_tag" - rm -f bb if [[ $snapshot == "false" ]]; then - unzip "/tmp/release/babashka-${image_tag}-linux-static-amd64.zip" + mv /tmp/release-static/bb . docker build -t "$image_name:alpine" -f Dockerfile.alpine . docker tag "$image_name:alpine" "$image_name:$image_tag-alpine" fi @@ -32,10 +31,8 @@ then if [ "false" = "$snapshot" ]; then echo "Pushing image $image_name:$latest_tag" docker push "$image_name:$latest_tag" - if [[ $snapshot == "false" ]]; then - echo "Pushing image $image_name:alpine" - docker push "$image_name:alpine" - fi + echo "Pushing image $image_name:alpine" + docker push "$image_name:alpine" fi # we update the version tag, even if it's a SNAPSHOT version echo "Pushing image $image_name:$image_tag" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f234b818e..ab1d4dcfc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -391,7 +391,7 @@ jobs: uses: actions/download-artifact@v2 with: name: babashka-${{ steps.babashka-version.outputs.version }}-linux-static-amd64.zip - path: /tmp/release + path: /tmp/release-static - name: Docker build env: