Skip to content

Commit

Permalink
chore(CI): Fixes Invalid GHA Workflow (#29) (#30)
Browse files Browse the repository at this point in the history
- Moves to platform specific build step to control tags.
  • Loading branch information
timnolte authored Dec 22, 2023
2 parents 3718f5b + 58994e3 commit df15c26
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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/[email protected]
if: matrix.platform == 'arm64'
env:
# see: https://github.com/devcontainers/ci/issues/191#issuecomment-1603857155
BUILDX_NO_DEFAULT_ATTESTATIONS: true
Expand All @@ -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

Expand Down

0 comments on commit df15c26

Please sign in to comment.