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 12, 2021
2 parents ebcaba1 + af33a1f commit 9eaf8a4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-master-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2423,7 +2423,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-draft-release:
needs: [build-v1-22-0-alpine-3-8, build-v1-22-0-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-21-0-alpine-3-8, build-v1-21-0-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-20-4-alpine-3-8, build-v1-20-4-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-19-7-alpine-3-8, build-v1-19-7-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-18-15-alpine-3-8, build-v1-18-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-17-17-alpine-3-8, build-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-16-15-alpine-3-8, build-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-15-12-alpine-3-8, build-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-14-10-alpine-3-8, build-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, converge-master-and-release-branches]
needs: [build-v1-22-0-alpine-3-8, build-v1-22-0-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-21-0-alpine-3-8, build-v1-21-0-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-20-4-alpine-3-8, build-v1-20-4-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-19-7-alpine-3-8, build-v1-19-7-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-18-15-alpine-3-8, build-v1-18-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-17-17-alpine-3-8, build-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-16-15-alpine-3-8, build-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-15-12-alpine-3-8, build-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, build-v1-14-10-alpine-3-8, build-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-8, converge-master-and-release-branches, resolve-release-tag]
# For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release.
# if: startsWith(github.ref, 'refs/tags/')
if: github.ref == 'refs/heads/release'
Expand Down
37 changes: 20 additions & 17 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: $( if ($_['_metadata']['distro'] -eq 'alpine' -and $_['_metadata']['distro_version'] -in @( '3.3', '3.4', '3.5' ) ) { 'linux/amd64' } else { 'linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x' } )
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: $( if ($_['_metadata']['distro'] -eq 'alpine' -and $_['_metadata']['distro_version'] -in @( '3.3', '3.4', '3.5' ) ) { 'linux/amd64' } else { 'linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x' } )
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: $( if ($_['_metadata']['distro'] -eq 'alpine' -and $_['_metadata']['distro_version'] -in @( '3.3', '3.4', '3.5' ) ) { 'linux/amd64' } else { 'linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x' } )
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 Expand Up @@ -252,7 +255,7 @@ if ( $_['tag_as_latest'] ) {
publish-draft-release:
needs: [$( $local:WORKFLOW_JOB_NAMES -join ', ' ), converge-master-and-release-branches]
needs: [$( $local:WORKFLOW_JOB_NAMES -join ', ' ), converge-master-and-release-branches, resolve-release-tag]
"@
@'
Expand Down

0 comments on commit 9eaf8a4

Please sign in to comment.