mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
chore(ci): build only amd64 docker images for PRs
This commit is contained in:
committed by
Łukasz Mierzwa
parent
2421a02cb5
commit
8ee85639d3
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user