From 486888aea820a4d195d0684ecb01b789e65526c1 Mon Sep 17 00:00:00 2001 From: arabcoders Date: Sat, 15 Nov 2025 22:53:04 +0300 Subject: [PATCH] Refactor: make it possible to disable ARM builds in private repos --- .github/workflows/main.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2c08cfd..df0d458b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,6 +24,7 @@ on: env: REGISTRY: ${{ vars.REGISTRY != '' && vars.REGISTRY || '' }} + BUILD_ARM64: ${{ vars.BUILD_ARM64 != 'false' && 'true' || 'false' }} DOCKERHUB_SLUG: arabcoders/ytptube GHCR_SLUG: ghcr.io/arabcoders/ytptube PNPM_VERSION: 10 @@ -131,6 +132,9 @@ jobs: arch: amd64 - os: ubuntu-latest arch: arm64 + enabled: ${{ vars.BUILD_ARM64 != 'false' }} + exclude: + - enabled: false permissions: packages: write contents: write @@ -277,10 +281,16 @@ jobs: IFS=$'\n' for tag in $(echo "${{ steps.meta.outputs.tags }}"); do echo "Creating manifest for ${tag}" - docker buildx imagetools create \ - --tag "$tag" \ - "${tag}-amd64" \ - "${tag}-arm64" + if [ "${{ env.BUILD_ARM64 }}" = "true" ]; then + docker buildx imagetools create \ + --tag "$tag" \ + "${tag}-amd64" \ + "${tag}-arm64" + else + docker buildx imagetools create \ + --tag "$tag" \ + "${tag}-amd64" + fi done - name: Overwrite GitHub release notes