From 600c1d8f8699a3c54b4ff5b19091e23a6c74f49b Mon Sep 17 00:00:00 2001 From: Leonard Jonathan Oh Date: Sun, 12 Sep 2021 20:40:00 +0000 Subject: [PATCH] Refactor: Keep only two multi-component variants for each alpine version --- .github/workflows/ci-master-pr.yml | 4622 +--------------------------- README.md | 35 - generate/definitions/VARIANTS.ps1 | 7 - 3 files changed, 36 insertions(+), 4628 deletions(-) diff --git a/.github/workflows/ci-master-pr.yml b/.github/workflows/ci-master-pr.yml index 3996ce5..7513ad9 100644 --- a/.github/workflows/ci-master-pr.yml +++ b/.github/workflows/ci-master-pr.yml @@ -10,4563 +10,12 @@ on: - master jobs: - build-3-12-curl: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.12-curl - # VARIANT_TAG_WITH_REF: 3.12-curl-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.12-curl - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-12-git: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.12-git - # VARIANT_TAG_WITH_REF: 3.12-git-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.12-git - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-12-jq: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.12-jq - # VARIANT_TAG_WITH_REF: 3.12-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.12-jq - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-12-ssh: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.12-ssh - # VARIANT_TAG_WITH_REF: 3.12-ssh-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.12-ssh - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-12-curl-git: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.12-curl-git - # VARIANT_TAG_WITH_REF: 3.12-curl-git-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.12-curl-git - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-12-curl-jq: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.12-curl-jq - # VARIANT_TAG_WITH_REF: 3.12-curl-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.12-curl-jq - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-12-curl-git-jq: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.12-curl-git-jq - # VARIANT_TAG_WITH_REF: 3.12-curl-git-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.12-curl-git-jq - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-12-curl-git-jq-ssh: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.12-curl-git-jq-ssh - # VARIANT_TAG_WITH_REF: 3.12-curl-git-jq-ssh-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.12-curl-git-jq-ssh - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - ${{ github.repository }}:latest - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-12-mysqlclient-openssl: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.12-mysqlclient-openssl - # VARIANT_TAG_WITH_REF: 3.12-mysqlclient-openssl-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.12-mysqlclient-openssl - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-11-curl: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.11-curl - # VARIANT_TAG_WITH_REF: 3.11-curl-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.11-curl - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-11-git: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.11-git - # VARIANT_TAG_WITH_REF: 3.11-git-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.11-git - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-11-jq: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.11-jq - # VARIANT_TAG_WITH_REF: 3.11-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.11-jq - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-11-ssh: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.11-ssh - # VARIANT_TAG_WITH_REF: 3.11-ssh-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.11-ssh - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-11-curl-git: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.11-curl-git - # VARIANT_TAG_WITH_REF: 3.11-curl-git-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.11-curl-git - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-11-curl-jq: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.11-curl-jq - # VARIANT_TAG_WITH_REF: 3.11-curl-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.11-curl-jq - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-11-curl-git-jq: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.11-curl-git-jq - # VARIANT_TAG_WITH_REF: 3.11-curl-git-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.11-curl-git-jq - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-11-curl-git-jq-ssh: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.11-curl-git-jq-ssh - # VARIANT_TAG_WITH_REF: 3.11-curl-git-jq-ssh-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.11-curl-git-jq-ssh - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-11-mysqlclient-openssl: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.11-mysqlclient-openssl - # VARIANT_TAG_WITH_REF: 3.11-mysqlclient-openssl-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.11-mysqlclient-openssl - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-10-curl: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.10-curl - # VARIANT_TAG_WITH_REF: 3.10-curl-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.10-curl - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-10-git: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.10-git - # VARIANT_TAG_WITH_REF: 3.10-git-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.10-git - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-10-jq: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.10-jq - # VARIANT_TAG_WITH_REF: 3.10-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.10-jq - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-10-ssh: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.10-ssh - # VARIANT_TAG_WITH_REF: 3.10-ssh-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.10-ssh - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-10-curl-git: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.10-curl-git - # VARIANT_TAG_WITH_REF: 3.10-curl-git-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.10-curl-git - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-10-curl-jq: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.10-curl-jq - # VARIANT_TAG_WITH_REF: 3.10-curl-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.10-curl-jq - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-10-curl-git-jq: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.10-curl-git-jq - # VARIANT_TAG_WITH_REF: 3.10-curl-git-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.10-curl-git-jq - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-10-curl-git-jq-ssh: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.10-curl-git-jq-ssh - # VARIANT_TAG_WITH_REF: 3.10-curl-git-jq-ssh-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.10-curl-git-jq-ssh - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-10-mysqlclient-openssl: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.10-mysqlclient-openssl - # VARIANT_TAG_WITH_REF: 3.10-mysqlclient-openssl-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.10-mysqlclient-openssl - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-9-curl: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.9-curl - # VARIANT_TAG_WITH_REF: 3.9-curl-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.9-curl - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-9-git: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.9-git - # VARIANT_TAG_WITH_REF: 3.9-git-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.9-git - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-9-jq: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.9-jq - # VARIANT_TAG_WITH_REF: 3.9-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.9-jq - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-9-ssh: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.9-ssh - # VARIANT_TAG_WITH_REF: 3.9-ssh-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.9-ssh - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-9-curl-git: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.9-curl-git - # VARIANT_TAG_WITH_REF: 3.9-curl-git-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.9-curl-git - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-9-curl-jq: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.9-curl-jq - # VARIANT_TAG_WITH_REF: 3.9-curl-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.9-curl-jq - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-9-curl-git-jq: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.9-curl-git-jq - # VARIANT_TAG_WITH_REF: 3.9-curl-git-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.9-curl-git-jq - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-9-curl-git-jq-ssh: - runs-on: ubuntu-latest - env: - VARIANT_TAG: 3.9-curl-git-jq-ssh - # VARIANT_TAG_WITH_REF: 3.9-curl-git-jq-ssh-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.9-curl-git-jq-ssh - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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@v1 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@master - - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- - - - name: Prepare - id: prep - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - run: | - set -e - - # Get 'namespace' and 'project-name' from 'namespace/project-name' - # CI_PROJECT_NAMESPACE=$( echo "${{ github.repository }}" | cut -d '/' -f 1 ) - # CI_PROJECT_NAME=$( echo "${{ github.repository }}" | cut -d '/' -f 2 ) - - # Get 'ref-name' from 'refs/heads/ref-name' - REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev ) - SHA_SHORT=$( echo "${GITHUB_SHA}" | cut -c1-7 ) - - # For Generate-DockerImageVariants: Generate the final tags. E.g. 'master-v1.0.0-alpine' and 'master-b29758a-v1.0.0-alpine' - VARIANT_TAG_WITH_REF="${REF}-${VARIANT_TAG}" - VARIANT_TAG_WITH_REF_AND_SHA_SHORT="${REF}-${SHA_SHORT}-${VARIANT_TAG}" - - # Set step output(s) - # echo "::set-output name=CI_PROJECT_NAMESPACE::$CI_PROJECT_NAMESPACE" - # echo "::set-output name=CI_PROJECT_NAME::$CI_PROJECT_NAME" - # echo "::set-output name=REF::$REF" - # echo "::set-output name=SHA_SHORT::$SHA_SHORT" - # echo "::set-output name=REF_AND_SHA_SHORT::$REF_AND_SHA_SHORT" - - # For Generate-DockerImageVariants: Set step output(s) - echo "::set-output name=CONTEXT::$VARIANT_BUILD_DIR" - echo "::set-output name=VARIANT_TAG::$VARIANT_TAG" - echo "::set-output name=VARIANT_TAG_WITH_REF::$VARIANT_TAG_WITH_REF" - echo "::set-output name=VARIANT_TAG_WITH_REF_AND_SHA_SHORT::$VARIANT_TAG_WITH_REF_AND_SHA_SHORT" - - - name: Login to docker registry - run: echo "${DOCKERHUB_REGISTRY_PASSWORD}" | docker login -u "${DOCKERHUB_REGISTRY_USER}" --password-stdin - env: - DOCKERHUB_REGISTRY_USER: ${{ secrets.DOCKERHUB_REGISTRY_USER }} - DOCKERHUB_REGISTRY_PASSWORD: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }} - - - name: Build (PRs) - id: docker_build_pr - # Run only on pull requests - if: github.event_name == 'pull_request' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: false - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (master) - id: docker_build_master - # Run only on master - if: github.ref == 'refs/heads/master' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: Build and push (release) - id: docker_build_release - # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. - # if: startsWith(github.ref, 'refs/tags/') - if: github.ref == 'refs/heads/release' - uses: docker/build-push-action@v2 - with: - context: ${{ steps.prep.outputs.CONTEXT }} - platforms: linux/386,linux/amd64,linux/arm,linux/arm64,linux/s390x - push: true - tags: | - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} - ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} - cache-from: type=local,src=/tmp/.buildx-cache - cache-to: type=local,dest=/tmp/.buildx-cache - - - name: List docker images - run: docker images - - - name: Clean-up - run: docker logout - if: always() - - build-3-9-mysqlclient-openssl: + build-3-12-curl-git-jq-ssh: runs-on: ubuntu-latest env: - VARIANT_TAG: 3.9-mysqlclient-openssl - # VARIANT_TAG_WITH_REF: 3.9-mysqlclient-openssl-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.9-mysqlclient-openssl + VARIANT_TAG: 3.12-curl-git-jq-ssh + # VARIANT_TAG_WITH_REF: 3.12-curl-git-jq-ssh-${GITHUB_REF} + VARIANT_BUILD_DIR: variants/3.12-curl-git-jq-ssh steps: - name: Checkout uses: actions/checkout@v2 @@ -4681,6 +130,7 @@ jobs: ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG }} ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF }} ${{ github.repository }}:${{ steps.prep.outputs.VARIANT_TAG_WITH_REF_AND_SHA_SHORT }} + ${{ github.repository }}:latest cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache @@ -4691,12 +141,12 @@ jobs: run: docker logout if: always() - build-3-8-curl: + build-3-12-mysqlclient-openssl: runs-on: ubuntu-latest env: - VARIANT_TAG: 3.8-curl - # VARIANT_TAG_WITH_REF: 3.8-curl-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.8-curl + VARIANT_TAG: 3.12-mysqlclient-openssl + # VARIANT_TAG_WITH_REF: 3.12-mysqlclient-openssl-${GITHUB_REF} + VARIANT_BUILD_DIR: variants/3.12-mysqlclient-openssl steps: - name: Checkout uses: actions/checkout@v2 @@ -4821,12 +271,12 @@ jobs: run: docker logout if: always() - build-3-8-git: + build-3-11-curl-git-jq-ssh: runs-on: ubuntu-latest env: - VARIANT_TAG: 3.8-git - # VARIANT_TAG_WITH_REF: 3.8-git-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.8-git + VARIANT_TAG: 3.11-curl-git-jq-ssh + # VARIANT_TAG_WITH_REF: 3.11-curl-git-jq-ssh-${GITHUB_REF} + VARIANT_BUILD_DIR: variants/3.11-curl-git-jq-ssh steps: - name: Checkout uses: actions/checkout@v2 @@ -4951,12 +401,12 @@ jobs: run: docker logout if: always() - build-3-8-jq: + build-3-11-mysqlclient-openssl: runs-on: ubuntu-latest env: - VARIANT_TAG: 3.8-jq - # VARIANT_TAG_WITH_REF: 3.8-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.8-jq + VARIANT_TAG: 3.11-mysqlclient-openssl + # VARIANT_TAG_WITH_REF: 3.11-mysqlclient-openssl-${GITHUB_REF} + VARIANT_BUILD_DIR: variants/3.11-mysqlclient-openssl steps: - name: Checkout uses: actions/checkout@v2 @@ -5081,12 +531,12 @@ jobs: run: docker logout if: always() - build-3-8-ssh: + build-3-10-curl-git-jq-ssh: runs-on: ubuntu-latest env: - VARIANT_TAG: 3.8-ssh - # VARIANT_TAG_WITH_REF: 3.8-ssh-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.8-ssh + VARIANT_TAG: 3.10-curl-git-jq-ssh + # VARIANT_TAG_WITH_REF: 3.10-curl-git-jq-ssh-${GITHUB_REF} + VARIANT_BUILD_DIR: variants/3.10-curl-git-jq-ssh steps: - name: Checkout uses: actions/checkout@v2 @@ -5211,12 +661,12 @@ jobs: run: docker logout if: always() - build-3-8-curl-git: + build-3-10-mysqlclient-openssl: runs-on: ubuntu-latest env: - VARIANT_TAG: 3.8-curl-git - # VARIANT_TAG_WITH_REF: 3.8-curl-git-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.8-curl-git + VARIANT_TAG: 3.10-mysqlclient-openssl + # VARIANT_TAG_WITH_REF: 3.10-mysqlclient-openssl-${GITHUB_REF} + VARIANT_BUILD_DIR: variants/3.10-mysqlclient-openssl steps: - name: Checkout uses: actions/checkout@v2 @@ -5341,12 +791,12 @@ jobs: run: docker logout if: always() - build-3-8-curl-jq: + build-3-9-curl-git-jq-ssh: runs-on: ubuntu-latest env: - VARIANT_TAG: 3.8-curl-jq - # VARIANT_TAG_WITH_REF: 3.8-curl-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.8-curl-jq + VARIANT_TAG: 3.9-curl-git-jq-ssh + # VARIANT_TAG_WITH_REF: 3.9-curl-git-jq-ssh-${GITHUB_REF} + VARIANT_BUILD_DIR: variants/3.9-curl-git-jq-ssh steps: - name: Checkout uses: actions/checkout@v2 @@ -5471,12 +921,12 @@ jobs: run: docker logout if: always() - build-3-8-curl-git-jq: + build-3-9-mysqlclient-openssl: runs-on: ubuntu-latest env: - VARIANT_TAG: 3.8-curl-git-jq - # VARIANT_TAG_WITH_REF: 3.8-curl-git-jq-${GITHUB_REF} - VARIANT_BUILD_DIR: variants/3.8-curl-git-jq + VARIANT_TAG: 3.9-mysqlclient-openssl + # VARIANT_TAG_WITH_REF: 3.9-mysqlclient-openssl-${GITHUB_REF} + VARIANT_BUILD_DIR: variants/3.9-mysqlclient-openssl steps: - name: Checkout uses: actions/checkout@v2 @@ -5863,7 +1313,7 @@ jobs: # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. converge-master-and-release-branches: - needs: [build-3-12-curl, build-3-12-git, build-3-12-jq, build-3-12-ssh, build-3-12-curl-git, build-3-12-curl-jq, build-3-12-curl-git-jq, build-3-12-curl-git-jq-ssh, build-3-12-mysqlclient-openssl, build-3-11-curl, build-3-11-git, build-3-11-jq, build-3-11-ssh, build-3-11-curl-git, build-3-11-curl-jq, build-3-11-curl-git-jq, build-3-11-curl-git-jq-ssh, build-3-11-mysqlclient-openssl, build-3-10-curl, build-3-10-git, build-3-10-jq, build-3-10-ssh, build-3-10-curl-git, build-3-10-curl-jq, build-3-10-curl-git-jq, build-3-10-curl-git-jq-ssh, build-3-10-mysqlclient-openssl, build-3-9-curl, build-3-9-git, build-3-9-jq, build-3-9-ssh, build-3-9-curl-git, build-3-9-curl-jq, build-3-9-curl-git-jq, build-3-9-curl-git-jq-ssh, build-3-9-mysqlclient-openssl, build-3-8-curl, build-3-8-git, build-3-8-jq, build-3-8-ssh, build-3-8-curl-git, build-3-8-curl-jq, build-3-8-curl-git-jq, build-3-8-curl-git-jq-ssh, build-3-8-mysqlclient-openssl] + needs: [build-3-12-curl-git-jq-ssh, build-3-12-mysqlclient-openssl, build-3-11-curl-git-jq-ssh, build-3-11-mysqlclient-openssl, build-3-10-curl-git-jq-ssh, build-3-10-mysqlclient-openssl, build-3-9-curl-git-jq-ssh, build-3-9-mysqlclient-openssl, build-3-8-curl-git-jq-ssh, build-3-8-mysqlclient-openssl] if: github.ref == 'refs/heads/release' runs-on: ubuntu-latest steps: @@ -5913,7 +1363,7 @@ jobs: run: echo ${{ steps.resolve-release-tag.outputs.TAG }} update-draft-release: - needs: [build-3-12-curl, build-3-12-git, build-3-12-jq, build-3-12-ssh, build-3-12-curl-git, build-3-12-curl-jq, build-3-12-curl-git-jq, build-3-12-curl-git-jq-ssh, build-3-12-mysqlclient-openssl, build-3-11-curl, build-3-11-git, build-3-11-jq, build-3-11-ssh, build-3-11-curl-git, build-3-11-curl-jq, build-3-11-curl-git-jq, build-3-11-curl-git-jq-ssh, build-3-11-mysqlclient-openssl, build-3-10-curl, build-3-10-git, build-3-10-jq, build-3-10-ssh, build-3-10-curl-git, build-3-10-curl-jq, build-3-10-curl-git-jq, build-3-10-curl-git-jq-ssh, build-3-10-mysqlclient-openssl, build-3-9-curl, build-3-9-git, build-3-9-jq, build-3-9-ssh, build-3-9-curl-git, build-3-9-curl-jq, build-3-9-curl-git-jq, build-3-9-curl-git-jq-ssh, build-3-9-mysqlclient-openssl, build-3-8-curl, build-3-8-git, build-3-8-jq, build-3-8-ssh, build-3-8-curl-git, build-3-8-curl-jq, build-3-8-curl-git-jq, build-3-8-curl-git-jq-ssh, build-3-8-mysqlclient-openssl, resolve-release-tag] + needs: [build-3-12-curl-git-jq-ssh, build-3-12-mysqlclient-openssl, build-3-11-curl-git-jq-ssh, build-3-11-mysqlclient-openssl, build-3-10-curl-git-jq-ssh, build-3-10-mysqlclient-openssl, build-3-9-curl-git-jq-ssh, build-3-9-mysqlclient-openssl, build-3-8-curl-git-jq-ssh, build-3-8-mysqlclient-openssl, resolve-release-tag] if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: @@ -5933,7 +1383,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} publish-draft-release: - needs: [build-3-12-curl, build-3-12-git, build-3-12-jq, build-3-12-ssh, build-3-12-curl-git, build-3-12-curl-jq, build-3-12-curl-git-jq, build-3-12-curl-git-jq-ssh, build-3-12-mysqlclient-openssl, build-3-11-curl, build-3-11-git, build-3-11-jq, build-3-11-ssh, build-3-11-curl-git, build-3-11-curl-jq, build-3-11-curl-git-jq, build-3-11-curl-git-jq-ssh, build-3-11-mysqlclient-openssl, build-3-10-curl, build-3-10-git, build-3-10-jq, build-3-10-ssh, build-3-10-curl-git, build-3-10-curl-jq, build-3-10-curl-git-jq, build-3-10-curl-git-jq-ssh, build-3-10-mysqlclient-openssl, build-3-9-curl, build-3-9-git, build-3-9-jq, build-3-9-ssh, build-3-9-curl-git, build-3-9-curl-jq, build-3-9-curl-git-jq, build-3-9-curl-git-jq-ssh, build-3-9-mysqlclient-openssl, build-3-8-curl, build-3-8-git, build-3-8-jq, build-3-8-ssh, build-3-8-curl-git, build-3-8-curl-jq, build-3-8-curl-git-jq, build-3-8-curl-git-jq-ssh, build-3-8-mysqlclient-openssl, converge-master-and-release-branches, resolve-release-tag] + needs: [build-3-12-curl-git-jq-ssh, build-3-12-mysqlclient-openssl, build-3-11-curl-git-jq-ssh, build-3-11-mysqlclient-openssl, build-3-10-curl-git-jq-ssh, build-3-10-mysqlclient-openssl, build-3-9-curl-git-jq-ssh, build-3-9-mysqlclient-openssl, build-3-8-curl-git-jq-ssh, build-3-8-mysqlclient-openssl, converge-master-and-release-branches, resolve-release-tag] # For Generate-DockerImageVariants: For CalVer releases. Each push to 'release' branch is a time-based release. # if: startsWith(github.ref, 'refs/tags/') if: github.ref == 'refs/heads/release' diff --git a/README.md b/README.md index 718c7ab..a876e32 100644 --- a/README.md +++ b/README.md @@ -10,48 +10,13 @@ Dockerized alpine with useful tools. | Tag | Dockerfile Build Context | |:-------:|:---------:| -| `:3.12-curl` | [View](variants/3.12-curl ) | -| `:3.12-git` | [View](variants/3.12-git ) | -| `:3.12-jq` | [View](variants/3.12-jq ) | -| `:3.12-ssh` | [View](variants/3.12-ssh ) | -| `:3.12-curl-git` | [View](variants/3.12-curl-git ) | -| `:3.12-curl-jq` | [View](variants/3.12-curl-jq ) | -| `:3.12-curl-git-jq` | [View](variants/3.12-curl-git-jq ) | | `:3.12-curl-git-jq-ssh`, `:latest` | [View](variants/3.12-curl-git-jq-ssh ) | | `:3.12-mysqlclient-openssl` | [View](variants/3.12-mysqlclient-openssl ) | -| `:3.11-curl` | [View](variants/3.11-curl ) | -| `:3.11-git` | [View](variants/3.11-git ) | -| `:3.11-jq` | [View](variants/3.11-jq ) | -| `:3.11-ssh` | [View](variants/3.11-ssh ) | -| `:3.11-curl-git` | [View](variants/3.11-curl-git ) | -| `:3.11-curl-jq` | [View](variants/3.11-curl-jq ) | -| `:3.11-curl-git-jq` | [View](variants/3.11-curl-git-jq ) | | `:3.11-curl-git-jq-ssh` | [View](variants/3.11-curl-git-jq-ssh ) | | `:3.11-mysqlclient-openssl` | [View](variants/3.11-mysqlclient-openssl ) | -| `:3.10-curl` | [View](variants/3.10-curl ) | -| `:3.10-git` | [View](variants/3.10-git ) | -| `:3.10-jq` | [View](variants/3.10-jq ) | -| `:3.10-ssh` | [View](variants/3.10-ssh ) | -| `:3.10-curl-git` | [View](variants/3.10-curl-git ) | -| `:3.10-curl-jq` | [View](variants/3.10-curl-jq ) | -| `:3.10-curl-git-jq` | [View](variants/3.10-curl-git-jq ) | | `:3.10-curl-git-jq-ssh` | [View](variants/3.10-curl-git-jq-ssh ) | | `:3.10-mysqlclient-openssl` | [View](variants/3.10-mysqlclient-openssl ) | -| `:3.9-curl` | [View](variants/3.9-curl ) | -| `:3.9-git` | [View](variants/3.9-git ) | -| `:3.9-jq` | [View](variants/3.9-jq ) | -| `:3.9-ssh` | [View](variants/3.9-ssh ) | -| `:3.9-curl-git` | [View](variants/3.9-curl-git ) | -| `:3.9-curl-jq` | [View](variants/3.9-curl-jq ) | -| `:3.9-curl-git-jq` | [View](variants/3.9-curl-git-jq ) | | `:3.9-curl-git-jq-ssh` | [View](variants/3.9-curl-git-jq-ssh ) | | `:3.9-mysqlclient-openssl` | [View](variants/3.9-mysqlclient-openssl ) | -| `:3.8-curl` | [View](variants/3.8-curl ) | -| `:3.8-git` | [View](variants/3.8-git ) | -| `:3.8-jq` | [View](variants/3.8-jq ) | -| `:3.8-ssh` | [View](variants/3.8-ssh ) | -| `:3.8-curl-git` | [View](variants/3.8-curl-git ) | -| `:3.8-curl-jq` | [View](variants/3.8-curl-jq ) | -| `:3.8-curl-git-jq` | [View](variants/3.8-curl-git-jq ) | | `:3.8-curl-git-jq-ssh` | [View](variants/3.8-curl-git-jq-ssh ) | | `:3.8-mysqlclient-openssl` | [View](variants/3.8-mysqlclient-openssl ) | diff --git a/generate/definitions/VARIANTS.ps1 b/generate/definitions/VARIANTS.ps1 index 356d378..e96e310 100644 --- a/generate/definitions/VARIANTS.ps1 +++ b/generate/definitions/VARIANTS.ps1 @@ -12,13 +12,6 @@ $local:VARIANTS_MATRIX = @( distro = 'alpine' distro_version = $v subvariants = @( - @{ components = @( 'curl' ) } - @{ components = @( 'git' ) } - @{ components = @( 'jq' ) } - @{ components = @( 'ssh' ) } - @{ components = @( 'curl', 'git' ) } - @{ components = @( 'curl', 'jq' ) } - @{ components = @( 'curl', 'git', 'jq' ) } @{ components = @( 'curl', 'git', 'jq', 'ssh' ); tag_as_latest = if ($v -eq $local:VARIANTS_DISTRO_VERSIONS[0]) { $true } else { $false } } @{ components = @( 'mysqlclient', 'openssl' ) } )