Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
leojonathanoh committed Sep 15, 2021
2 parents 1cd8ecb + c8e0fa0 commit c2336cf
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down
1 change: 1 addition & 0 deletions generate/definitions/VARIANTS.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
35 changes: 19 additions & 16 deletions generate/templates/.github/workflows/ci-master-pr.yml.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
'@

$local:WORKFLOW_JOB_NAMES = $VARIANTS | % { "build-$( $_['tag'].Replace('.', '-') )" }
$( $VARIANTS | % {
$VARIANTS | % {
@"
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand All @@ -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'] ) {
@'
Expand All @@ -160,7 +163,7 @@ if ( $_['tag_as_latest'] ) {
run: docker logout
if: always()
'@
})
}

@"
Expand Down

0 comments on commit c2336cf

Please sign in to comment.