Skip to content

Commit

Permalink
Only build amd64 on branches to speed up build times
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcgary committed Nov 15, 2024
1 parent a431ec1 commit fe9f866
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,12 @@ jobs:
env:
REGISTRY: "public.ecr.aws/z6g0f8n7"
REPOSITORY: ${{ github.event.repository.name }}
PLATFORMS: "linux/amd64,linux/arm64"
run: |
VERSION=$(cat .release_version)
if [[ $GITHUB_REF == refs/heads/master ]]; then
docker buildx build --platform $PLATFORMS -t $REGISTRY/$REPOSITORY:$VERSION -t $REGISTRY/$REPOSITORY:latest --push .
docker buildx build --platform "linux/amd64,linux/arm64" -t $REGISTRY/$REPOSITORY:$VERSION -t $REGISTRY/$REPOSITORY:latest --push .
else
docker buildx build --platform $PLATFORMS -t $REGISTRY/$REPOSITORY:$VERSION --push .
docker buildx build --platform "linux/amd64" -t $REGISTRY/$REPOSITORY:$VERSION --push .
fi
build-create-release:
runs-on: ubuntu-latest
Expand Down

0 comments on commit fe9f866

Please sign in to comment.