Skip to content

Commit

Permalink
Fix this env var handling (derp)
Browse files Browse the repository at this point in the history
  • Loading branch information
brndnmtthws committed May 2, 2024
1 parent 6a248a9 commit a5cc142
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,20 @@ jobs:
image_tags+=("--tag" "$DOCKERHUB_IMAGE_ID:$VERSION_TAG")
if [ "$RELEASE" == "ON" ]; then
# tag as latest on releases
image_tags+=("--tag" "$DOCKERHUB_IMAGE_ID:latest")
fi
# tag as latest on releases
[[ "$RELEASE" == "ON" ]] && image_tags+=("--tag" "$DOCKERHUB_IMAGE_ID:latest")
# Only build amd64 on PRs, build all platforms on main. The arm builds
# take far too long.
image_platforms="--platform linux/amd64"
push_image=""
cache_tag="pr-cache"
if [ "${{ github.ref }}" == "refs/head/main" ]; then
# Only push on main
push_image="--push"
image_platforms="--platform linux/arm/v7,linux/arm64/v8,linux/amd64"
cache_tag="main-cache"
fi
# Only push on main
[[ "${{ github.ref }}" == "refs/head/main" ]] \
&& push_image="--push" \
&& image_platforms="--platform linux/arm/v7,linux/arm64/v8,linux/amd64" \
&& cache_tag="main-cache"
docker buildx build \
${push_image} \
Expand Down

0 comments on commit a5cc142

Please sign in to comment.