diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index cab4664..641c97a 100644 --- a/.github/workflows/ci-master-pr.yml +++ b/.github/workflows/ci-master-pr.yml @@ -94,7 +94,7 @@ jobs: uses: docker/build-push-action@v2 with: context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x + platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} @@ -109,7 +109,7 @@ jobs: uses: docker/build-push-action@v2 with: context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x + platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} @@ -124,7 +124,7 @@ jobs: uses: docker/build-push-action@v2 with: context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x + platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} diff --git a/generate/definitions/VARIANTS.ps1 b/generate/definitions/VARIANTS.ps1 index 4105116..ec908e9 100644 --- a/generate/definitions/VARIANTS.ps1 +++ b/generate/definitions/VARIANTS.ps1 @@ -5,6 +5,7 @@ $VARIANTS = @( components = @( 'varnishdashboard' ) distro = 'ubuntu' distro_version = '16.04' + platforms = 'linux/386,linux/amd64,linux/arm/v7,linux/arm64,linux/s390x' VARNISH_AGENT_VERSION = '4.1.4' VARNISH_DASHBOARD_COMMIT = "e2cc1c854941c9fac18bdfedba2819fa766a5549" } diff --git a/generate/templates/.github/workflows/ci-master-pr.yml.ps1 b/generate/templates/.github/workflows/ci-master-pr.yml.ps1 index d28d631..417262a 100644 --- a/generate/templates/.github/workflows/ci-master-pr.yml.ps1 +++ b/generate/templates/.github/workflows/ci-master-pr.yml.ps1 @@ -13,7 +13,7 @@ jobs: '@ $local:WORKFLOW_JOB_NAMES = $VARIANTS | % { "build-$( $_['tag'].Replace('.', '-') )" } -$( $VARIANTS | % { +$VARIANTS | % { @" @@ -97,18 +97,21 @@ $( $VARIANTS | % { DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + +'@ +@" - name: Build (PRs) id: docker_build_pr # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v2 with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x + context: `${{ steps.prep.outputs.CONTEXT }} + platforms: $( $_['_metadata']['platforms'] -join ',' ) push: false tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} + `${{ github.repository }}:`${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} + `${{ github.repository }}:`${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache @@ -118,12 +121,12 @@ $( $VARIANTS | % { if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v2 with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x + context: `${{ steps.prep.outputs.CONTEXT }} + platforms: $( $_['_metadata']['platforms'] -join ',' ) push: true tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} + `${{ github.repository }}:`${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} + `${{ github.repository }}:`${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} cache-to: type=local,dest=/tmp/.buildx-cache - name: Build and push (release) @@ -133,15 +136,15 @@ $( $VARIANTS | % { if: github.ref == 'refs/heads/release' uses: docker/build-push-action@v2 with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x + context: `${{ steps.prep.outputs.CONTEXT }} + platforms: $( $_['_metadata']['platforms'] -join ',' ) push: true tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} + `${{ github.repository }}:`${{ steps.prep.outputs.VARIANT_TAG }} + `${{ github.repository }}:`${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} + `${{ github.repository }}:`${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} -'@ +"@ if ( $_['tag_as_latest'] ) { @' @@ -160,7 +163,7 @@ if ( $_['tag_as_latest'] ) { run: docker logout if: always() '@ -}) +} @"