From c59bd28daa1277a6840d72f733c2c55089773f99 Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Mon, 25 Sep 2023 13:19:52 +0000 Subject: [PATCH] Enhancement (ci): Add support for incremental variants --- .github/workflows/ci-master-pr.yml | 934 +++++++++--------- .../.github/workflows/ci-master-pr.yml.ps1 | 109 +- 2 files changed, 541 insertions(+), 502 deletions(-) diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index 5ff8f08..5b4f463 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-v3-1-6: + build-3-1-6: runs-on: ubuntu-latest - env: - VARIANT: v3.1.6 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-3.1.6-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.1.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-v3-1-6 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="v3.1.6" 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: v3.1.6 - 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-v3-1-6.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-6.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: v3.1.6 - 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-v3-1-6.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-6.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: v3.1.6 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -139,9 +138,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-v3-1-6.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-6.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-6.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 @@ -154,10 +153,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-1-5: + build-3-1-5: runs-on: ubuntu-latest - env: - VARIANT: v3.1.5 steps: - name: Checkout uses: actions/checkout@v3 @@ -187,14 +184,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.1.5-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.1.5- ${{ 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-v3-1-5 run: | set -e @@ -207,24 +212,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.1.5" 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: v3.1.5 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -233,12 +231,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-v3-1-5.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-5.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: v3.1.5 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -247,12 +245,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-v3-1-5.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-5.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: v3.1.5 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -260,9 +258,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-v3-1-5.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-5.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-5.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 +272,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-1-4: + build-3-1-4: runs-on: ubuntu-latest - env: - VARIANT: v3.1.4 steps: - name: Checkout uses: actions/checkout@v3 @@ -307,14 +303,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.1.4-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.1.4- ${{ 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-v3-1-4 run: | set -e @@ -327,24 +331,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.1.4" 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: v3.1.4 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -353,12 +350,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-v3-1-4.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-4.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: v3.1.4 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -367,12 +364,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-v3-1-4.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-4.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: v3.1.4 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -380,9 +377,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-v3-1-4.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-4.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-4.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -394,10 +391,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-1-3: + build-3-1-3: runs-on: ubuntu-latest - env: - VARIANT: v3.1.3 steps: - name: Checkout uses: actions/checkout@v3 @@ -427,14 +422,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.1.3-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.1.3- ${{ 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-v3-1-3 run: | set -e @@ -447,24 +450,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.1.3" 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: v3.1.3 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -473,12 +469,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-v3-1-3.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-3.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: v3.1.3 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -487,12 +483,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-v3-1-3.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-3.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: v3.1.3 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -500,9 +496,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-v3-1-3.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-3.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-3.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 +510,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-1-2: + build-3-1-2: runs-on: ubuntu-latest - env: - VARIANT: v3.1.2 steps: - name: Checkout uses: actions/checkout@v3 @@ -547,14 +541,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.1.2-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.1.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-v3-1-2 run: | set -e @@ -567,24 +569,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.1.2" 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: v3.1.2 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -593,12 +588,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-v3-1-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-2.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: v3.1.2 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -607,12 +602,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-v3-1-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-2.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: v3.1.2 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -620,9 +615,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-v3-1-2.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-2.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -634,10 +629,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-1-1: + build-3-1-1: runs-on: ubuntu-latest - env: - VARIANT: v3.1.1 steps: - name: Checkout uses: actions/checkout@v3 @@ -667,14 +660,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.1.1-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.1.1- ${{ 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-v3-1-1 run: | set -e @@ -687,24 +688,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.1.1" 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: v3.1.1 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -713,12 +707,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-v3-1-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-1.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: v3.1.1 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -727,12 +721,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-v3-1-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-1.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: v3.1.1 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -740,9 +734,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-v3-1-1.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-1.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 +748,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-1-0: + build-3-1-0: runs-on: ubuntu-latest - env: - VARIANT: v3.1.0 steps: - name: Checkout uses: actions/checkout@v3 @@ -787,14 +779,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.1.0-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.1.0- ${{ 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-v3-1-0 run: | set -e @@ -807,24 +807,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.1.0" 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: v3.1.0 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -833,12 +826,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-v3-1-0.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-0.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: v3.1.0 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -847,12 +840,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-v3-1-0.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-0.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: v3.1.0 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -860,9 +853,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-v3-1-0.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-0.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-1-0.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -874,10 +867,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-0-9: + build-3-0-9: runs-on: ubuntu-latest - env: - VARIANT: v3.0.9 steps: - name: Checkout uses: actions/checkout@v3 @@ -907,14 +898,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.0.9-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.0.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-v3-0-9 run: | set -e @@ -927,24 +926,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.0.9" 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: v3.0.9 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -953,12 +945,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-v3-0-9.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-9.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: v3.0.9 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -967,12 +959,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-v3-0-9.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-9.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: v3.0.9 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -980,9 +972,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-v3-0-9.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-9.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-9.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 +986,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-0-8: + build-3-0-8: runs-on: ubuntu-latest - env: - VARIANT: v3.0.8 steps: - name: Checkout uses: actions/checkout@v3 @@ -1027,14 +1017,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.0.8-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.0.8- ${{ 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-v3-0-8 run: | set -e @@ -1047,24 +1045,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.0.8" 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: v3.0.8 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1073,12 +1064,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-v3-0-8.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-8.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: v3.0.8 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1087,12 +1078,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-v3-0-8.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-8.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: v3.0.8 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1100,9 +1091,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-v3-0-8.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-8.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-8.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1114,10 +1105,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-0-7: + build-3-0-7: runs-on: ubuntu-latest - env: - VARIANT: v3.0.7 steps: - name: Checkout uses: actions/checkout@v3 @@ -1147,14 +1136,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.0.7-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.0.7- ${{ 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-v3-0-7 run: | set -e @@ -1167,24 +1164,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.0.7" 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: v3.0.7 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1193,12 +1183,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-v3-0-7.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-7.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: v3.0.7 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1207,12 +1197,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-v3-0-7.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-7.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: v3.0.7 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1220,9 +1210,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-v3-0-7.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-7.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-7.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 +1224,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-0-6: + build-3-0-6: runs-on: ubuntu-latest - env: - VARIANT: v3.0.6 steps: - name: Checkout uses: actions/checkout@v3 @@ -1267,14 +1255,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.0.6-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.0.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-v3-0-6 run: | set -e @@ -1287,24 +1283,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.0.6" 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: v3.0.6 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1313,12 +1302,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-v3-0-6.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-6.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: v3.0.6 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1327,12 +1316,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-v3-0-6.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-6.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: v3.0.6 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1340,9 +1329,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-v3-0-6.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-6.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-6.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1354,10 +1343,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-0-5: + build-3-0-5: runs-on: ubuntu-latest - env: - VARIANT: v3.0.5 steps: - name: Checkout uses: actions/checkout@v3 @@ -1387,14 +1374,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.0.5-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.0.5- ${{ 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-v3-0-5 run: | set -e @@ -1407,24 +1402,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.0.5" 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: v3.0.5 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1433,12 +1421,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-v3-0-5.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-5.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: v3.0.5 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1447,12 +1435,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-v3-0-5.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-5.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: v3.0.5 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1460,9 +1448,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-v3-0-5.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-5.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-5.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 +1462,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-0-4: + build-3-0-4: runs-on: ubuntu-latest - env: - VARIANT: v3.0.4 steps: - name: Checkout uses: actions/checkout@v3 @@ -1507,14 +1493,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.0.4-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.0.4- ${{ 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-v3-0-4 run: | set -e @@ -1527,24 +1521,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.0.4" 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: v3.0.4 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1553,12 +1540,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-v3-0-4.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-4.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: v3.0.4 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1567,12 +1554,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-v3-0-4.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-4.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: v3.0.4 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1580,9 +1567,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-v3-0-4.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-4.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-4.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1594,10 +1581,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-0-3: + build-3-0-3: runs-on: ubuntu-latest - env: - VARIANT: v3.0.3 steps: - name: Checkout uses: actions/checkout@v3 @@ -1627,14 +1612,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.0.3-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.0.3- ${{ 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-v3-0-3 run: | set -e @@ -1647,24 +1640,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.0.3" 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: v3.0.3 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1673,12 +1659,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-v3-0-3.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-3.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: v3.0.3 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1687,12 +1673,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-v3-0-3.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-3.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: v3.0.3 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1700,9 +1686,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-v3-0-3.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-3.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-3.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 +1700,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-0-2: + build-3-0-2: runs-on: ubuntu-latest - env: - VARIANT: v3.0.2 steps: - name: Checkout uses: actions/checkout@v3 @@ -1747,14 +1731,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.0.2-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.0.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-v3-0-2 run: | set -e @@ -1767,24 +1759,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.0.2" 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: v3.0.2 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1793,12 +1778,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-v3-0-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-2.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: v3.0.2 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1807,12 +1792,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-v3-0-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-2.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: v3.0.2 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1820,9 +1805,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-v3-0-2.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-2.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-2.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1834,10 +1819,8 @@ jobs: rm -rf /tmp/.buildx-cache mv /tmp/.buildx-cache-new /tmp/.buildx-cache - build-v3-0-1: + build-3-0-1: runs-on: ubuntu-latest - env: - VARIANT: v3.0.1 steps: - name: Checkout uses: actions/checkout@v3 @@ -1867,14 +1850,22 @@ jobs: uses: actions/cache@v3 with: path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ env.VARIANT }}-${{ github.sha }} + key: ${{ runner.os }}-buildx-3.0.1-${{ github.sha }} restore-keys: | - ${{ runner.os }}-buildx-${{ env.VARIANT }}- + ${{ runner.os }}-buildx-3.0.1- ${{ 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-v3-0-1 run: | set -e @@ -1887,24 +1878,17 @@ jobs: # Generate docker image tags # E.g. 'v0.0.0-' and 'v0.0.0-abc0123-' # E.g. 'master-' and 'master-abc0123-' + VARIANT="v3.0.1" 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: v3.0.1 - Build (PRs) # Run only on pull requests if: github.event_name == 'pull_request' uses: docker/build-push-action@v3 @@ -1913,12 +1897,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-v3-0-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-1.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: v3.0.1 - Build and push (master) # Run only on master if: github.ref == 'refs/heads/master' uses: docker/build-push-action@v3 @@ -1927,12 +1911,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-v3-0-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-1.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: v3.0.1 - Build and push (release) if: startsWith(github.ref, 'refs/tags/') uses: docker/build-push-action@v3 with: @@ -1940,9 +1924,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-v3-0-1.outputs.VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-1.outputs.REF_VARIANT }} + ${{ github.repository }}:${{ steps.prep-v3-0-1.outputs.REF_SHA_VARIANT }} cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max @@ -1955,7 +1939,23 @@ jobs: mv /tmp/.buildx-cache-new /tmp/.buildx-cache update-draft-release: - needs: [build-v3-1-6, build-v3-1-5, build-v3-1-4, build-v3-1-3, build-v3-1-2, build-v3-1-1, build-v3-1-0, build-v3-0-9, build-v3-0-8, build-v3-0-7, build-v3-0-6, build-v3-0-5, build-v3-0-4, build-v3-0-3, build-v3-0-2, build-v3-0-1] + needs: + - build-3-1-6 + - build-3-1-5 + - build-3-1-4 + - build-3-1-3 + - build-3-1-2 + - build-3-1-1 + - build-3-1-0 + - build-3-0-9 + - build-3-0-8 + - build-3-0-7 + - build-3-0-6 + - build-3-0-5 + - build-3-0-4 + - build-3-0-3 + - build-3-0-2 + - build-3-0-1 if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: @@ -1968,7 +1968,23 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish-draft-release: - needs: [build-v3-1-6, build-v3-1-5, build-v3-1-4, build-v3-1-3, build-v3-1-2, build-v3-1-1, build-v3-1-0, build-v3-0-9, build-v3-0-8, build-v3-0-7, build-v3-0-6, build-v3-0-5, build-v3-0-4, build-v3-0-3, build-v3-0-2, build-v3-0-1] + needs: + - build-3-1-6 + - build-3-1-5 + - build-3-1-4 + - build-3-1-3 + - build-3-1-2 + - build-3-1-1 + - build-3-1-0 + - build-3-0-9 + - build-3-0-8 + - build-3-0-7 + - build-3-0-6 + - build-3-0-5 + - build-3-0-4 + - build-3-0-3 + - build-3-0-2 + - build-3-0-1 if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: @@ -1983,7 +1999,23 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} update-dockerhub-description: - needs: [build-v3-1-6, build-v3-1-5, build-v3-1-4, build-v3-1-3, build-v3-1-2, build-v3-1-1, build-v3-1-0, build-v3-0-9, build-v3-0-8, build-v3-0-7, build-v3-0-6, build-v3-0-5, build-v3-0-4, build-v3-0-3, build-v3-0-2, build-v3-0-1] + needs: + - build-3-1-6 + - build-3-1-5 + - build-3-1-4 + - build-3-1-3 + - build-3-1-2 + - build-3-1-1 + - build-3-1-0 + - build-3-0-9 + - build-3-0-8 + - build-3-0-7 + - build-3-0-6 + - build-3-0-5 + - build-3-0-4 + - build-3-0-3 + - build-3-0-2 + - build-3-0-1 if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: diff --git a/generate/templates/.github/workflows/ci-master-pr.yml.ps1 b/generate/templates/.github/workflows/ci-master-pr.yml.ps1 index 601380f..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 @@ -182,7 +186,8 @@ if ( $_['tag_as_latest'] ) { update-draft-release: - needs: [$( $local:WORKFLOW_JOB_NAMES -join ', ' )] + needs: + - $( $WORKFLOW_JOB_NAMES -join "`n - " ) if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: @@ -195,7 +200,8 @@ if ( $_['tag_as_latest'] ) { GITHUB_TOKEN: `${{ secrets.GITHUB_TOKEN }} publish-draft-release: - needs: [$( $local:WORKFLOW_JOB_NAMES -join ', ' )] + needs: + - $( $WORKFLOW_JOB_NAMES -join "`n - " ) if: startsWith(github.ref, 'refs/tags/') runs-on: ubuntu-latest steps: @@ -210,7 +216,8 @@ if ( $_['tag_as_latest'] ) { GITHUB_TOKEN: `${{ secrets.GITHUB_TOKEN }} update-dockerhub-description: - needs: [$( $local:WORKFLOW_JOB_NAMES -join ', ' )] + needs: + - $( $WORKFLOW_JOB_NAMES -join "`n - " ) if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: