Skip to content

Commit

Permalink
[babashka#699] Remove redundant checks for snapshot, fix actions build
Browse files Browse the repository at this point in the history
  • Loading branch information
lispyclouds committed Jan 3, 2021
1 parent 8b61d85 commit e05b690
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
6 changes: 2 additions & 4 deletions .circleci/script/docker
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
11 changes: 4 additions & 7 deletions .github/script/docker
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,20 @@ 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
# we only update latest when it's not a SNAPSHOT version
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"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e05b690

Please sign in to comment.