[#699] Remove redundant checks for snapshot, fix actions build

This commit is contained in:
Rahul De 2021-01-03 14:53:52 +01:00
parent 8b61d855a8
commit e05b6903ec
No known key found for this signature in database
GPG key ID: 4435E700B66BA90F
3 changed files with 7 additions and 12 deletions

View file

@ -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"

11
.github/script/docker vendored
View file

@ -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"

View file

@ -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: