From aa19ae5a215e99c575abc1759fe736ba2b30563b Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Wed, 12 Jun 2024 16:41:58 +0000 Subject: [PATCH] fix(package): publish multi-arch releases Fixes #387 --- .github/workflows/publish-release.yml | 10 +--------- .github/workflows/pull-request-release.yml | 10 +--------- apps/game-db-updater/scripts/package.ts | 2 +- apps/playnite-web/scripts/package.js | 2 +- hass-game-db-updater/scripts/package.ts | 2 +- hass-playnite-web/scripts/package.ts | 2 +- 6 files changed, 6 insertions(+), 22 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 5cdf81d12..6f4a0c3ef 100755 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -47,14 +47,6 @@ jobs: OWNER: andrew-codes REPO_NAME: playnite-web runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - platform: - - linux/amd64 - - linux/arm/v6 - - linux/arm/v7 - - linux/arm64 steps: - name: Checkout uses: actions/checkout@v4 @@ -98,7 +90,7 @@ jobs: env: NODE_ENV: production DEBUG: 'playnite-web/*' - PLATFORM: ${{ matrix.platform }} + PLATFORM: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 package: name: Publish Extension diff --git a/.github/workflows/pull-request-release.yml b/.github/workflows/pull-request-release.yml index d6ce10dd7..7dfdf429c 100755 --- a/.github/workflows/pull-request-release.yml +++ b/.github/workflows/pull-request-release.yml @@ -48,14 +48,6 @@ jobs: REGISTRY: ghcr.io OWNER: andrew-codes REPO_NAME: playnite-web - strategy: - fail-fast: false - matrix: - platform: - - linux/amd64 - - linux/arm/v6 - - linux/arm/v7 - - linux/arm64 steps: - uses: actions/checkout@v4 with: @@ -92,7 +84,7 @@ jobs: env: NODE_ENV: production DEBUG: 'playnite-web/*' - PLATFORM: ${{ matrix.platform }} + PLATFORM: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 unit_tests_windows: name: Verify PR - Tests (Windows) diff --git a/apps/game-db-updater/scripts/package.ts b/apps/game-db-updater/scripts/package.ts index fa063a147..f7c91a0b0 100755 --- a/apps/game-db-updater/scripts/package.ts +++ b/apps/game-db-updater/scripts/package.ts @@ -15,7 +15,7 @@ async function run() { for (const tag of tags) { sh.exec( - `docker build --platform ${PLATFORM} --tag "${REGISTRY}/${OWNER}/${pkg.name}:${tag}" --file Dockerfile .`, + `docker buildx build --platform ${PLATFORM} --tag "${REGISTRY}/${OWNER}/${pkg.name}:${tag}" --file Dockerfile .`, ) } } diff --git a/apps/playnite-web/scripts/package.js b/apps/playnite-web/scripts/package.js index 008b6b8f8..733ad2946 100755 --- a/apps/playnite-web/scripts/package.js +++ b/apps/playnite-web/scripts/package.js @@ -17,7 +17,7 @@ async function run() { for (const tag of tags) { sh.exec( - `docker build --platform ${PLATFORM} --tag "${REGISTRY}/${OWNER}/${pkg.name}:${tag}" --file Dockerfile .`, + `docker buildx build --platform ${PLATFORM} --tag "${REGISTRY}/${OWNER}/${pkg.name}:${tag}" --file Dockerfile .`, ) } } diff --git a/hass-game-db-updater/scripts/package.ts b/hass-game-db-updater/scripts/package.ts index 0cf08fcb0..0c95d29a5 100755 --- a/hass-game-db-updater/scripts/package.ts +++ b/hass-game-db-updater/scripts/package.ts @@ -15,7 +15,7 @@ async function run() { for (const tag of tags) { sh.exec( - `docker build --platform ${PLATFORM} --tag "${REGISTRY}/${OWNER}/${pkg.name}:${tag}" --file Dockerfile --build-arg VERSION=${tag} .`, + `docker buildx build --platform ${PLATFORM} --tag "${REGISTRY}/${OWNER}/${pkg.name}:${tag}" --file Dockerfile --build-arg VERSION=${tag} .`, ) } } diff --git a/hass-playnite-web/scripts/package.ts b/hass-playnite-web/scripts/package.ts index 0cf08fcb0..0c95d29a5 100755 --- a/hass-playnite-web/scripts/package.ts +++ b/hass-playnite-web/scripts/package.ts @@ -15,7 +15,7 @@ async function run() { for (const tag of tags) { sh.exec( - `docker build --platform ${PLATFORM} --tag "${REGISTRY}/${OWNER}/${pkg.name}:${tag}" --file Dockerfile --build-arg VERSION=${tag} .`, + `docker buildx build --platform ${PLATFORM} --tag "${REGISTRY}/${OWNER}/${pkg.name}:${tag}" --file Dockerfile --build-arg VERSION=${tag} .`, ) } }