chore(ci): build only amd64 docker images for PRs

This commit is contained in:
Łukasz Mierzwa
2020-11-26 17:57:38 +00:00
committed by Łukasz Mierzwa
parent 2421a02cb5
commit 8ee85639d3

View File

@@ -620,13 +620,23 @@ jobs:
echo 'ghcr.io/prymitive/karma:latest' >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: "Setup docker plaforms (merge/release)"
if: github.event_name != 'pull_request'
run: |
echo "DOCKER_PATFORMS=linux/amd64,linux/arm64" >> $GITHUB_ENV
- name: "Setup docker plaforms (PR)"
if: github.event_name == 'pull_request'
run: |
echo "DOCKER_PATFORMS=linux/amd64" >> $GITHUB_ENV
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
platforms: ${{ env.DOCKER_PATFORMS }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ env.DOCKER_TAGS }}
cache-from: type=local,src=/tmp/.buildx-cache