From 58994e33a22a3ba5fe0c59e83da3f5a33311eb7f Mon Sep 17 00:00:00 2001 From: Tim Nolte Date: Fri, 22 Dec 2023 00:24:45 -0500 Subject: [PATCH] chore(CI): Fixes Invalid GHA Workflow (#29) - Moves to platform specific build step to control tags. --- .github/workflows/release-build.yml | 30 ++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml index 61d28d9..3e28190 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release-build.yml @@ -76,23 +76,27 @@ jobs: with: node-version-file: '.nvmrc' - - name: Set amd64 Image Tags - id: image-tags + # https://github.com/marketplace/actions/dev-container-build-and-run-action + - name: Pre-build Dev Container Image + uses: devcontainers/ci@v0.3 if: matrix.platform == 'amd64' - run: | - IMAGE_TAGS=$(echo php-${{ matrix.PHP_VERSION }}-node-${{ matrix.NODE_VERSION }},php-${{ matrix.PHP_VERSION }}-node-${{ matrix.NODE_VERSION }}-${{ matrix.platform }}) - echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT - - - name: Set arm64 Image Tags - id: image-tags - if: matrix.platform == 'arm64' - run: | - IMAGE_TAGS=$(echo php-${{ matrix.PHP_VERSION }}-node-${{ matrix.NODE_VERSION }}-${{ matrix.platform }}) - echo "IMAGE_TAGS=$IMAGE_TAGS" >> $GITHUB_OUTPUT + env: + # see: https://github.com/devcontainers/ci/issues/191#issuecomment-1603857155 + BUILDX_NO_DEFAULT_ATTESTATIONS: true + PHP_VERSION: ${{ matrix.PHP_VERSION }} + NODE_VERSION: ${{ matrix.NODE_VERSION }} + with: + platform: linux/${{ matrix.platform }} + imageName: ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.PACKAGE }} + cacheFrom: ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.PACKAGE }} + imageTag: php-${{ matrix.PHP_VERSION }}-node-${{ matrix.NODE_VERSION }},php-${{ matrix.PHP_VERSION }}-node-${{ matrix.NODE_VERSION }}-${{ matrix.platform }} + push: always + skipContainerUserIdUpdate: true # https://github.com/marketplace/actions/dev-container-build-and-run-action - name: Pre-build Dev Container Image uses: devcontainers/ci@v0.3 + if: matrix.platform == 'arm64' env: # see: https://github.com/devcontainers/ci/issues/191#issuecomment-1603857155 BUILDX_NO_DEFAULT_ATTESTATIONS: true @@ -102,7 +106,7 @@ jobs: platform: linux/${{ matrix.platform }} imageName: ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.PACKAGE }} cacheFrom: ${{ env.REGISTRY }}/${{ env.OWNER }}/${{ env.PACKAGE }} - imageTag: ${{ steps.image-tags.outputs.IMAGE_TAGS }} + imageTag: php-${{ matrix.PHP_VERSION }}-node-${{ matrix.NODE_VERSION }}-${{ matrix.platform }} push: always skipContainerUserIdUpdate: true