Build arm64 images only on master builds, as it's quite slow.
This commit is contained in:
parent
4eb945786d
commit
96c79be786
1 changed files with 10 additions and 1 deletions
11
.github/workflows/main.yml
vendored
11
.github/workflows/main.yml
vendored
|
|
@ -45,7 +45,7 @@ on:
|
|||
env:
|
||||
DOCKERHUB_SLUG: arabcoders/ytptube
|
||||
GHCR_SLUG: ghcr.io/arabcoders/ytptube
|
||||
PLATFORMS: linux/amd64,linux/arm64
|
||||
PLATFORMS: linux/amd64
|
||||
|
||||
jobs:
|
||||
build-pr:
|
||||
|
|
@ -118,6 +118,15 @@ jobs:
|
|||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Set Platforms Based on Branch
|
||||
id: set_platforms
|
||||
run: |
|
||||
if [ "${GITHUB_REF}" == "refs/heads/${{ github.repository.default_branch }}" ]; then
|
||||
echo "PLATFORMS=linux/amd64,linux/arm64" >> $GITHUB_ENV
|
||||
else
|
||||
echo "PLATFORMS=linux/amd64" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
|
|
|
|||
Loading…
Reference in a new issue