Skip to content

Commit

Permalink
dynamically set platforms based on version
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterOdin committed Nov 20, 2023
1 parent 7a3b63d commit c7116e3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ jobs:
- run: echo "Building prestodb-sandbox=${{ inputs.version }}, latest=${{ inputs.latest }}"
- name: Checkout
uses: actions/checkout@v4
- name: Set build properties
id: properties
run: |
version=${{ inputs.version }}
if (( $(echo "${VERSION} > 0.281" | bc -l) )); then
platform="linux/amd64,linux/arm64"
else
platform="linux/amd64"
fi
echo "platforms=${platform}"
echo "platforms=${platform}" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand All @@ -46,7 +57,7 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
platforms: ${{ steps.properties.outputs.platforms }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down

0 comments on commit c7116e3

Please sign in to comment.