diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index 681fe7d..865b892 100644 --- a/.github/workflows/ci-master-pr.yml +++ b/.github/workflows/ci-master-pr.yml @@ -33,10 +33,8 @@ jobs: run: | git diff --exit-code - build-v1-28-2-alpine-3-15: + build-1-28-2: runs-on: ubuntu-latest - env: - VARIANT: v1.28.2-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -66,14 +64,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.28.2-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.28.2- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-28-2-alpine-3-15 run: | set -e @@ -86,24 +92,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.28.2-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.28.2-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -112,12 +111,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.28.2-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -126,12 +125,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.28.2-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -139,62 +138,16 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-alpine-3-15.outputs.REF_SHA_VARIANT }} ${{ github.repository }}:latest cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-28-2-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.28.2-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-28-2-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -207,24 +160,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.28.2-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.28.2-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -233,12 +179,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.28.2-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -247,12 +193,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.28.2-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -260,9 +206,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-28-2-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -274,10 +220,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-27-6-alpine-3-15: + build-1-27-6: runs-on: ubuntu-latest - env: - VARIANT: v1.27.6-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -307,14 +251,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.27.6-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.27.6- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-27-6-alpine-3-15 run: | set -e @@ -327,24 +279,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.27.6-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.27.6-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -353,12 +298,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.27.6-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -367,12 +312,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.27.6-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -380,61 +325,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-27-6-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.27.6-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-27-6-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -447,24 +346,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.27.6-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.27.6-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -473,12 +365,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.27.6-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -487,12 +379,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.27.6-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -500,9 +392,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-27-6-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -514,10 +406,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-26-9-alpine-3-15: + build-1-26-9: runs-on: ubuntu-latest - env: - VARIANT: v1.26.9-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -547,14 +437,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.26.9-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.26.9- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-26-9-alpine-3-15 run: | set -e @@ -567,24 +465,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.26.9-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.26.9-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -593,12 +484,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.26.9-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -607,12 +498,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.26.9-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -620,61 +511,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-26-9-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.26.9-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-26-9-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -687,24 +532,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.26.9-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.26.9-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -713,12 +551,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.26.9-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -727,12 +565,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.26.9-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -740,9 +578,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-26-9-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -754,10 +592,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-25-14-alpine-3-15: + build-1-25-14: runs-on: ubuntu-latest - env: - VARIANT: v1.25.14-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -787,14 +623,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.25.14-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.25.14- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-25-14-alpine-3-15 run: | set -e @@ -807,24 +651,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.25.14-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.25.14-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -833,12 +670,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.25.14-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -847,12 +684,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.25.14-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -860,61 +697,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-25-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.25.14-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-25-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -927,24 +718,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.25.14-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) + - name: v1.25.14-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -953,12 +737,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.25.14-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -967,12 +751,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.25.14-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -980,9 +764,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-25-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -994,10 +778,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-24-17-alpine-3-15: + build-1-24-17: runs-on: ubuntu-latest - env: - VARIANT: v1.24.17-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -1027,14 +809,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.24.17-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.24.17- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-24-17-alpine-3-15 run: | set -e @@ -1047,24 +837,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.24.17-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.24.17-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1073,12 +856,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.24.17-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1087,12 +870,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.24.17-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1100,61 +883,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-24-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.24.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-24-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -1167,24 +904,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.24.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.24.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1193,12 +923,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.24.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1207,12 +937,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.24.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1220,9 +950,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-24-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1234,10 +964,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-23-17-alpine-3-15: + build-1-23-17: runs-on: ubuntu-latest - env: - VARIANT: v1.23.17-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -1267,14 +995,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.23.17-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.23.17- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-23-17-alpine-3-15 run: | set -e @@ -1287,24 +1023,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.23.17-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.23.17-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1313,12 +1042,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.23.17-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1327,12 +1056,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.23.17-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1340,61 +1069,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-23-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.23.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-23-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -1407,24 +1090,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.23.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.23.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1433,12 +1109,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.23.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1447,12 +1123,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.23.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1460,9 +1136,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-23-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1474,10 +1150,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-22-17-alpine-3-15: + build-1-22-17: runs-on: ubuntu-latest - env: - VARIANT: v1.22.17-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -1507,14 +1181,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.22.17-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.22.17- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-22-17-alpine-3-15 run: | set -e @@ -1527,24 +1209,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.22.17-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.22.17-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1553,12 +1228,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.22.17-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1567,12 +1242,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.22.17-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1580,61 +1255,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-22-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.22.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-22-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -1647,24 +1276,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.22.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.22.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1673,12 +1295,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.22.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1687,12 +1309,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.22.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1700,9 +1322,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-22-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1714,10 +1336,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-21-14-alpine-3-15: + build-1-21-14: runs-on: ubuntu-latest - env: - VARIANT: v1.21.14-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -1747,14 +1367,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.21.14-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.21.14- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-21-14-alpine-3-15 run: | set -e @@ -1767,24 +1395,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.21.14-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.21.14-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1793,12 +1414,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.21.14-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1807,12 +1428,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.21.14-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1820,61 +1441,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-21-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.21.14-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-21-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -1887,24 +1462,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.21.14-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) + - name: v1.21.14-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1913,12 +1481,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.21.14-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1927,12 +1495,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.21.14-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1940,9 +1508,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-21-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1954,10 +1522,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-20-15-alpine-3-15: + build-1-20-15: runs-on: ubuntu-latest - env: - VARIANT: v1.20.15-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -1987,14 +1553,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.20.15-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.20.15- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-20-15-alpine-3-15 run: | set -e @@ -2007,24 +1581,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.20.15-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.20.15-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -2033,12 +1600,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.20.15-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -2047,12 +1614,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.20.15-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -2060,61 +1627,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-20-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.20.15-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-20-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -2127,24 +1648,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.20.15-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.20.15-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -2153,12 +1667,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.20.15-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -2167,12 +1681,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.20.15-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -2180,9 +1694,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-20-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -2194,10 +1708,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-19-16-alpine-3-15: + build-1-19-16: runs-on: ubuntu-latest - env: - VARIANT: v1.19.16-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -2227,14 +1739,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.19.16-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.19.16- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-19-16-alpine-3-15 run: | set -e @@ -2247,24 +1767,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.19.16-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.19.16-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -2273,12 +1786,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.19.16-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -2287,12 +1800,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.19.16-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -2300,61 +1813,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-19-16-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.19.16-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-19-16-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -2367,24 +1834,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.19.16-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) + - name: v1.19.16-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -2393,12 +1853,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.19.16-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -2407,12 +1867,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.19.16-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -2420,9 +1880,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-19-16-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -2434,10 +1894,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-18-20-alpine-3-15: + build-1-18-20: runs-on: ubuntu-latest - env: - VARIANT: v1.18.20-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -2467,14 +1925,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.18.20-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.18.20- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-18-20-alpine-3-15 run: | set -e @@ -2487,24 +1953,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.18.20-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) + - name: v1.18.20-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -2513,12 +1972,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.18.20-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -2527,12 +1986,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.18.20-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -2540,61 +1999,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-18-20-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.18.20-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-18-20-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -2607,24 +2020,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.18.20-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.18.20-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -2633,12 +2039,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.18.20-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -2647,12 +2053,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.18.20-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -2660,9 +2066,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-18-20-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -2674,10 +2080,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-17-17-alpine-3-15: + build-1-17-17: runs-on: ubuntu-latest - env: - VARIANT: v1.17.17-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -2707,14 +2111,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.17.17-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.17.17- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-17-17-alpine-3-15 run: | set -e @@ -2727,24 +2139,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.17.17-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) + - name: v1.17.17-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -2753,12 +2158,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.17.17-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -2767,12 +2172,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.17.17-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -2780,61 +2185,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.17.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -2847,24 +2206,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.17.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.17.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -2873,12 +2225,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.17.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -2887,12 +2239,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.17.17-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -2900,9 +2252,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -2914,10 +2266,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-16-15-alpine-3-15: + build-1-16-15: runs-on: ubuntu-latest - env: - VARIANT: v1.16.15-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -2947,14 +2297,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.16.15-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.16.15- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-16-15-alpine-3-15 run: | set -e @@ -2967,24 +2325,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.16.15-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) + - name: v1.16.15-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -2993,12 +2344,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.16.15-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -3007,12 +2358,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.16.15-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -3020,61 +2371,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.16.15-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -3087,24 +2392,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.16.15-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) + - name: v1.16.15-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -3113,12 +2411,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.16.15-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -3127,12 +2425,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.16.15-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -3140,9 +2438,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -3154,10 +2452,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-15-12-alpine-3-15: + build-1-15-12: runs-on: ubuntu-latest - env: - VARIANT: v1.15.12-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -3187,14 +2483,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.15.12-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.15.12- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-15-12-alpine-3-15 run: | set -e @@ -3207,24 +2511,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.15.12-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) + - name: v1.15.12-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -3233,12 +2530,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.15.12-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -3247,12 +2544,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.15.12-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -3260,61 +2557,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.15.12-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -3327,24 +2578,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.15.12-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) + - name: v1.15.12-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -3353,12 +2597,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.15.12-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -3367,12 +2611,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.15.12-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -3380,9 +2624,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -3394,10 +2638,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v1-14-10-alpine-3-15: + build-1-14-10: runs-on: ubuntu-latest - env: - VARIANT: v1.14.10-alpine-3.15 steps: - name: Checkout uses: actions/checkout@v3 @@ -3427,14 +2669,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-1.14.10-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-1.14.10- ${{ runner.os }}-buildx- + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-14-10-alpine-3-15 run: | set -e @@ -3447,24 +2697,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.14.10-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) + - name: v1.14.10-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -3473,12 +2716,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.14.10-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -3487,12 +2730,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.14.10-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -3500,61 +2743,15 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - # Temp fix - # https://github.com/docker/build-push-action/issues/252 - # https://github.com/moby/buildkit/issues/1896 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache - - build-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15: - runs-on: ubuntu-latest - env: - VARIANT: v1.14.10-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Display system info (linux) - run: | - set -e - hostname - whoami - cat /etc/*release - lscpu - free - df -h - pwd - docker info - docker version - - # See: https://github.com/docker/build-push-action/blob/v2.6.1/docs/advanced/cache.md#github-cache - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v2 - - - name: Cache Docker layers - uses: actions/cache@v3 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- - # This step generates the docker tags - name: Prepare - id: prep + id: prep-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 run: | set -e @@ -3567,24 +2764,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v1.14.10-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15" REF_VARIANT="${REF}-${VARIANT}" REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT + echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT + echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT + echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT - - name: Build (PRs) + - name: v1.14.10-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -3593,12 +2783,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: false tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: v1.14.10-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -3607,12 +2797,12 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: v1.14.10-envsubst-git-jq-kustomize-sops-ssh-alpine-3.15 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -3620,9 +2810,9 @@ jobs: platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x push: true tags: | - ${{ github.repository }}:${{ env.VARIANT }} - ${{ github.repository }}:${{ env.REF_VARIANT }} - ${{ github.repository }}:${{ env.REF_SHA_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -3636,36 +2826,21 @@ jobs: update-draft-release: needs: - - build-v1-28-2-alpine-3-15 - - build-v1-28-2-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-27-6-alpine-3-15 - - build-v1-27-6-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-26-9-alpine-3-15 - - build-v1-26-9-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-25-14-alpine-3-15 - - build-v1-25-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-24-17-alpine-3-15 - - build-v1-24-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-23-17-alpine-3-15 - - build-v1-23-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-22-17-alpine-3-15 - - build-v1-22-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-21-14-alpine-3-15 - - build-v1-21-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-20-15-alpine-3-15 - - build-v1-20-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-19-16-alpine-3-15 - - build-v1-19-16-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-18-20-alpine-3-15 - - build-v1-18-20-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-17-17-alpine-3-15 - - build-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-16-15-alpine-3-15 - - build-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-15-12-alpine-3-15 - - build-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-14-10-alpine-3-15 - - build-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 + - build-1-28-2 + - build-1-27-6 + - build-1-26-9 + - build-1-25-14 + - build-1-24-17 + - build-1-23-17 + - build-1-22-17 + - build-1-21-14 + - build-1-20-15 + - build-1-19-16 + - build-1-18-20 + - build-1-17-17 + - build-1-16-15 + - build-1-15-12 + - build-1-14-10 if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: @@ -3679,36 +2854,21 @@ jobs: publish-draft-release: needs: - - build-v1-28-2-alpine-3-15 - - build-v1-28-2-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-27-6-alpine-3-15 - - build-v1-27-6-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-26-9-alpine-3-15 - - build-v1-26-9-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-25-14-alpine-3-15 - - build-v1-25-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-24-17-alpine-3-15 - - build-v1-24-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-23-17-alpine-3-15 - - build-v1-23-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-22-17-alpine-3-15 - - build-v1-22-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-21-14-alpine-3-15 - - build-v1-21-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-20-15-alpine-3-15 - - build-v1-20-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-19-16-alpine-3-15 - - build-v1-19-16-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-18-20-alpine-3-15 - - build-v1-18-20-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-17-17-alpine-3-15 - - build-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-16-15-alpine-3-15 - - build-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-15-12-alpine-3-15 - - build-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-14-10-alpine-3-15 - - build-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 + - build-1-28-2 + - build-1-27-6 + - build-1-26-9 + - build-1-25-14 + - build-1-24-17 + - build-1-23-17 + - build-1-22-17 + - build-1-21-14 + - build-1-20-15 + - build-1-19-16 + - build-1-18-20 + - build-1-17-17 + - build-1-16-15 + - build-1-15-12 + - build-1-14-10 if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: @@ -3724,36 +2884,21 @@ jobs: update-dockerhub-description: needs: - - build-v1-28-2-alpine-3-15 - - build-v1-28-2-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-27-6-alpine-3-15 - - build-v1-27-6-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-26-9-alpine-3-15 - - build-v1-26-9-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-25-14-alpine-3-15 - - build-v1-25-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-24-17-alpine-3-15 - - build-v1-24-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-23-17-alpine-3-15 - - build-v1-23-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-22-17-alpine-3-15 - - build-v1-22-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-21-14-alpine-3-15 - - build-v1-21-14-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-20-15-alpine-3-15 - - build-v1-20-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-19-16-alpine-3-15 - - build-v1-19-16-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-18-20-alpine-3-15 - - build-v1-18-20-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-17-17-alpine-3-15 - - build-v1-17-17-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-16-15-alpine-3-15 - - build-v1-16-15-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-15-12-alpine-3-15 - - build-v1-15-12-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 - - build-v1-14-10-alpine-3-15 - - build-v1-14-10-envsubst-git-jq-kustomize-sops-ssh-alpine-3-15 + - build-1-28-2 + - build-1-27-6 + - build-1-26-9 + - build-1-25-14 + - build-1-24-17 + - build-1-23-17 + - build-1-22-17 + - build-1-21-14 + - build-1-20-15 + - build-1-19-16 + - build-1-18-20 + - build-1-17-17 + - build-1-16-15 + - build-1-15-12 + - build-1-14-10 if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: diff --git a/generate/definitions/VARIANTS.ps1 b/generate/definitions/VARIANTS.ps1 index 413d59d..2205d44 100755 --- a/generate/definitions/VARIANTS.ps1 +++ b/generate/definitions/VARIANTS.ps1 @@ -4,7 +4,7 @@ $local:VERSIONS = @( Get-Content $PSScriptRoot/versions.json -Encoding utf8 -raw $local:VARIANTS_MATRIX = @( foreach ($v in $local:VERSIONS.kubectl.versions) { @{ - package_version = "v$v" + package_version = $v distro = 'alpine' distro_version = '3.15' subvariants = @( @@ -28,7 +28,7 @@ $VARIANTS = @( } # Docker image tag. E.g. 'v2.3.0.0-alpine-3.6' tag = @( - $variant['package_version'] + "v$( $variant['package_version'] )" $subVariant['components'] | ? { $_ } $variant['distro'] $variant['distro_version'] diff --git a/generate/templates/.github/workflows/ci-master-pr.yml.ps1 b/generate/templates/.github/workflows/ci-master-pr.yml.ps1 index 789dfcb..c73c08f 100644 --- a/generate/templates/.github/workflows/ci-master-pr.yml.ps1 +++ b/generate/templates/.github/workflows/ci-master-pr.yml.ps1 @@ -35,18 +35,15 @@ jobs: git diff --exit-code '@ -$local:WORKFLOW_JOB_NAMES = $VARIANTS | % { "build-$( $_['tag'].Replace('.', '-') )" } -$VARIANTS | % { +# Group variants by the package version +$groups = $VARIANTS | Group-Object -Property { $_['_metadata']['package_version'] } | Sort-Object -Property { [version]$_.Name } -Descending +$WORKFLOW_JOB_NAMES = $groups | % { "build-$( $_.Name.Replace('.', '-') )" } +foreach ($g in $groups) { @" - build-$( $_['tag'].Replace('.', '-') ): + build-$( $g.Name.Replace('.', '-') ): runs-on: ubuntu-latest - env: - VARIANT: $( $_['tag'] ) -"@ -@' - steps: - name: Checkout uses: actions/checkout@v3 @@ -76,89 +73,92 @@ $VARIANTS | % { uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: `${{ runner.os }}-buildx-$( $g.Name )-`${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- - ${{ runner.os }}-buildx- + `${{ runner.os }}-buildx-$( $g.Name )- + `${{ runner.os }}-buildx- + + - name: Login to Docker Hub registry + # Run on master and tags + if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v2 + with: + username: `${{ secrets.DOCKERHUB_REGISTRY_USER }} + password: `${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + + +"@ +foreach ($v in $g.Group) { +@" # This step generates the docker tags - name: Prepare - id: prep + id: prep-$( $v['tag' ].Replace('.', '-') ) run: | set -e # Get ref, i.e. from refs/heads/, or from refs/tags/. E.g. 'master' or 'v0.0.0' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) + REF=`$( echo "`${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) # Get short commit hash E.g. 'abc0123' - SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 ) + SHA=`$( echo "`${GITHUB_SHA}" | cut -c1-7 ) # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' - REF_VARIANT="${REF}-${VARIANT}" - REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}" + VARIANT="$( $v['tag'] )" + REF_VARIANT="`${REF}-`${VARIANT}" + REF_SHA_VARIANT="`${REF}-`${SHA}-`${VARIANT}" # Pass variables to next step - echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_ENV - echo "VARIANT=$VARIANT" >> $GITHUB_ENV - echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_ENV - echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_ENV - - - name: Login to Docker Hub registry - # Run on master and tags - if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} + echo "VARIANT_BUILD_DIR=`$VARIANT_BUILD_DIR" >> `$GITHUB_OUTPUT + echo "VARIANT=`$VARIANT" >> `$GITHUB_OUTPUT + echo "REF_VARIANT=`$REF_VARIANT" >> `$GITHUB_OUTPUT + echo "REF_SHA_VARIANT=`$REF_SHA_VARIANT" >> `$GITHUB_OUTPUT - -'@ -@" - - name: Build (PRs) + - name: $( $v['tag' ] ) - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 with: - context: $( $_['build_dir_rel'] ) - platforms: $( $_['_metadata']['platforms'] -join ',' ) + context: $( $v['build_dir_rel'] ) + platforms: $( $v['_metadata']['platforms'] -join ',' ) push: false tags: | - `${{ github.repository }}:`${{ env.REF_VARIANT }} - `${{ github.repository }}:`${{ env.REF_SHA_VARIANT }} + `${{ github.repository }}:`${{ steps.prep-$( $v['tag'].Replace('.', '-') ).outputs.REF_VARIANT }} + `${{ github.repository }}:`${{ steps.prep-$( $v['tag'].Replace('.', '-') ).outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (master) + - name: $( $v['tag' ] ) - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 with: - context: $( $_['build_dir_rel'] ) - platforms: $( $_['_metadata']['platforms'] -join ',' ) + context: $( $v['build_dir_rel'] ) + platforms: $( $v['_metadata']['platforms'] -join ',' ) push: true tags: | - `${{ github.repository }}:`${{ env.REF_VARIANT }} - `${{ github.repository }}:`${{ env.REF_SHA_VARIANT }} + `${{ github.repository }}:`${{ steps.prep-$( $v['tag'].Replace('.', '-') ).outputs.REF_VARIANT }} + `${{ github.repository }}:`${{ steps.prep-$( $v['tag'].Replace('.', '-') ).outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max - - name: Build and push (release) + - name: $( $v['tag' ] ) - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: - context: $( $_['build_dir_rel'] ) - platforms: $( $_['_metadata']['platforms'] -join ',' ) + context: $( $v['build_dir_rel'] ) + platforms: $( $v['_metadata']['platforms'] -join ',' ) push: true tags: | - `${{ github.repository }}:`${{ env.VARIANT }} - `${{ github.repository }}:`${{ env.REF_VARIANT }} - `${{ github.repository }}:`${{ env.REF_SHA_VARIANT }} + `${{ github.repository }}:`${{ steps.prep-$( $v['tag'].Replace('.', '-') ).outputs.VARIANT }} + `${{ github.repository }}:`${{ steps.prep-$( $v['tag'].Replace('.', '-') ).outputs.REF_VARIANT }} + `${{ github.repository }}:`${{ steps.prep-$( $v['tag'].Replace('.', '-') ).outputs.REF_SHA_VARIANT }} "@ -if ( $_['tag_as_latest'] ) { +if ( $v['tag_as_latest'] ) { @' ${{ github.repository }}:latest @@ -168,6 +168,10 @@ if ( $_['tag_as_latest'] ) { cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max + +'@ +} +@' # Temp fix # https://github.com/docker/build-push-action/issues/252 # https://github.com/moby/buildkit/issues/1896 @@ -183,7 +187,7 @@ if ( $_['tag_as_latest'] ) { update-draft-release: needs: - - $( $local:WORKFLOW_JOB_NAMES -join "`n - " ) + - $( $WORKFLOW_JOB_NAMES -join "`n - " ) if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: @@ -197,7 +201,7 @@ if ( $_['tag_as_latest'] ) { publish-draft-release: needs: - - $( $local:WORKFLOW_JOB_NAMES -join "`n - " ) + - $( $WORKFLOW_JOB_NAMES -join "`n - " ) if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: @@ -213,7 +217,7 @@ if ( $_['tag_as_latest'] ) { update-dockerhub-description: needs: - - $( $local:WORKFLOW_JOB_NAMES -join "`n - " ) + - $( $WORKFLOW_JOB_NAMES -join "`n - " ) if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: diff --git a/generate/templates/Dockerfile.ps1 b/generate/templates/Dockerfile.ps1 index fac6903..77efb68 100755 --- a/generate/templates/Dockerfile.ps1 +++ b/generate/templates/Dockerfile.ps1 @@ -7,7 +7,7 @@ RUN echo "I am running on `$BUILDPLATFORM, building for `$TARGETPLATFORM" RUN apk add --no-cache ca-certificates # When `$TARGETPLATFORM is linux/arm/v7, strip out the '/v6' or '/v7' from it -RUN BIN_URL=https://storage.googleapis.com/kubernetes-release/release/$( $VARIANT['_metadata']['package_version'] )/bin/`$( echo `$TARGETPLATFORM | sed 's@/v[67]$@@' )/kubectl \ +RUN BIN_URL=https://storage.googleapis.com/kubernetes-release/release/v$( $VARIANT['_metadata']['package_version'] )/bin/`$( echo `$TARGETPLATFORM | sed 's@/v[67]$@@' )/kubectl \ && SHA512=`$( wget -qO- "`$BIN_URL.sha512" ) \ && wget -qO- "`$BIN_URL" > /usr/local/bin/kubectl \ && chmod +x /usr/local/bin/kubectl \