Skip to content

Enhancement: Add code-server 4.95.3 variants #701

Enhancement: Add code-server 4.95.3 variants

Enhancement: Add code-server 4.95.3 variants #701

Workflow file for this run

name: ci-master-pr
on:
push:
branches:
- master
tags:
- '**'
pull_request:
branches:
- master
merge_group:
jobs:
test-nogitdiff:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/powershell:lts-7.2-alpine-3.17
steps:
- run: |
apk add --no-cache git
- uses: actions/checkout@v4
- name: Ignore git permissions
run: |
git config --global --add safe.directory "$( pwd )"
- name: Generate variants
run: |
pwsh -Command '
$ErrorActionPreference = "Stop"
Install-Module -Name Generate-DockerImageVariants -Force -Scope CurrentUser -Verbose
Generate-DockerImageVariants .
'
- name: Test - no git diff
run: |
git diff --exit-code
build-4-95-3:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.95.3-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.95.3-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-95-3
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.95.3"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.95.3 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.95.3
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.95.3 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.95.3
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.95.3 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.95.3
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3.outputs.REF_SHA_VARIANT }}
${{ github.repository }}:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-95-3-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.95.3-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.95.3-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.95.3-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.95.3-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.95.3-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.95.3-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.95.3-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-95-3-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.95.3-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.95.3-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.95.3-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.95.3-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.95.3-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.95.3-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.95.3-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-95-3-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.95.3-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.95.3-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.95.3-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.95.3-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.95.3-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.95.3-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.95.3-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-95-3-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.95.3-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.95.3-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.95.3-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.95.3-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.95.3-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.95.3-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.95.3-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-95-3-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-93-1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.93.1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.93.1-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-93-1
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.93.1"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.93.1 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.93.1
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.93.1 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.93.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.93.1 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.93.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-93-1-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.93.1-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.93.1-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.93.1-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.93.1-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.93.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.93.1-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.93.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-93-1-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.93.1-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.93.1-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.93.1-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.93.1-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.93.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.93.1-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.93.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-93-1-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.93.1-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.93.1-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.93.1-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.93.1-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.93.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.93.1-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.93.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-93-1-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.93.1-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.93.1-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.93.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.93.1-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.93.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.93.1-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.93.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-93-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-92-2:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.92.2-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.92.2-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-92-2
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.92.2"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.92.2 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.92.2
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.92.2 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.92.2
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.92.2 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.92.2
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-92-2-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.92.2-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.92.2-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.92.2-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.92.2-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.92.2-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.92.2-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.92.2-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-92-2-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.92.2-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.92.2-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.92.2-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.92.2-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.92.2-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.92.2-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.92.2-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-92-2-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.92.2-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.92.2-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.92.2-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.92.2-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.92.2-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.92.2-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.92.2-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-92-2-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.92.2-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.92.2-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.92.2-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.92.2-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.92.2-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.92.2-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.92.2-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-92-2-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-91-1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.91.1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.91.1-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-91-1
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.91.1"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.91.1 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.91.1
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.91.1 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.91.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.91.1 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.91.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-91-1-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.91.1-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.91.1-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.91.1-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.91.1-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.91.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.91.1-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.91.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-91-1-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.91.1-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.91.1-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.91.1-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.91.1-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.91.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.91.1-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.91.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-91-1-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.91.1-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.91.1-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.91.1-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.91.1-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.91.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.91.1-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.91.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-91-1-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.91.1-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.91.1-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.91.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.91.1-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.91.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.91.1-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.91.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-91-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-90-3:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.90.3-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.90.3-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-90-3
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.90.3"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.90.3 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.90.3
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.90.3 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.90.3
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.90.3 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.90.3
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-90-3-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.90.3-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.90.3-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.90.3-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.90.3-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.90.3-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.90.3-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.90.3-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-90-3-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.90.3-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.90.3-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.90.3-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.90.3-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.90.3-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.90.3-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.90.3-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-90-3-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.90.3-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.90.3-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.90.3-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.90.3-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.90.3-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.90.3-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.90.3-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-90-3-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.90.3-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.90.3-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.90.3-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.90.3-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.90.3-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.90.3-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.90.3-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-90-3-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-89-1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.89.1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.89.1-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-89-1
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.89.1"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.89.1 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.89.1
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.89.1 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.89.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.89.1 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.89.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-89-1-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.89.1-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.89.1-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.89.1-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.89.1-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.89.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.89.1-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.89.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-89-1-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.89.1-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.89.1-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.89.1-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.89.1-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.89.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.89.1-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.89.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-89-1-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.89.1-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.89.1-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.89.1-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.89.1-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.89.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.89.1-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.89.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-89-1-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.89.1-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.89.1-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.89.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.89.1-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.89.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.89.1-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.89.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-89-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-23-1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.23.1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.23.1-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-23-1
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.23.1"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.23.1 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.23.1
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.23.1 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.23.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.23.1 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.23.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-23-1-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.23.1-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.23.1-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.23.1-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.23.1-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.23.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.23.1-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.23.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-23-1-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.23.1-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.23.1-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.23.1-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.23.1-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.23.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.23.1-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.23.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-23-1-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.23.1-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.23.1-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.23.1-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.23.1-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.23.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.23.1-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.23.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-23-1-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.23.1-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.23.1-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.23.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.23.1-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.23.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.23.1-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.23.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-23-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-22-1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.22.1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.22.1-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-22-1
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.22.1"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.22.1 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.22.1
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.22.1 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.22.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.22.1 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.22.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-22-1-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.22.1-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.22.1-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.22.1-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.22.1-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.22.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.22.1-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.22.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-22-1-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.22.1-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.22.1-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.22.1-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.22.1-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.22.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.22.1-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.22.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-22-1-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.22.1-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.22.1-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.22.1-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.22.1-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.22.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.22.1-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.22.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-22-1-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.22.1-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.22.1-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.22.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.22.1-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.22.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.22.1-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.22.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-22-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-21-2:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.21.2-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.21.2-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-21-2
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.21.2"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.21.2 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.21.2
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.21.2 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.21.2
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.21.2 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.21.2
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-21-2-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.21.2-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.21.2-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.21.2-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.21.2-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.21.2-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.21.2-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.21.2-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-21-2-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.21.2-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.21.2-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.21.2-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.21.2-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.21.2-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.21.2-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.21.2-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-21-2-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.21.2-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.21.2-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.21.2-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.21.2-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.21.2-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.21.2-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.21.2-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-21-2-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.21.2-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.21.2-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.21.2-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.21.2-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.21.2-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.21.2-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.21.2-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-21-2-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-20-1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.20.1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.20.1-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-20-1
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.20.1"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.20.1 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.20.1
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.20.1 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.20.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.20.1 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.20.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-20-1-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.20.1-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.20.1-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.20.1-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.20.1-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.20.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.20.1-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.20.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-20-1-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.20.1-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.20.1-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.20.1-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.20.1-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.20.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.20.1-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.20.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-20-1-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.20.1-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.20.1-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.20.1-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.20.1-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.20.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.20.1-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.20.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-20-1-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.20.1-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.20.1-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.20.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.20.1-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.20.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.20.1-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.20.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-20-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-19-1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.19.1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.19.1-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-19-1
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.19.1"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.19.1 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.19.1
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.19.1 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.19.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.19.1 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.19.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-19-1-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.19.1-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.19.1-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.19.1-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.19.1-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.19.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.19.1-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.19.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-19-1-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.19.1-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.19.1-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.19.1-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.19.1-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.19.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.19.1-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.19.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-19-1-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.19.1-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.19.1-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.19.1-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.19.1-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.19.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.19.1-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.19.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-19-1-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.19.1-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.19.1-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.19.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.19.1-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.19.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.19.1-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.19.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-19-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-18-0:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.18.0-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.18.0-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-18-0
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.18.0"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.18.0 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.18.0
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.18.0 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.18.0
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.18.0 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.18.0
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-18-0-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.18.0-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.18.0-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.18.0-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.18.0-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.18.0-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.18.0-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.18.0-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-18-0-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.18.0-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.18.0-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.18.0-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.18.0-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.18.0-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.18.0-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.18.0-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-18-0-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.18.0-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.18.0-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.18.0-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.18.0-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.18.0-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.18.0-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.18.0-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-18-0-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.18.0-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.18.0-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.18.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.18.0-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.18.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.18.0-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.18.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-18-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-17-1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.17.1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.17.1-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-17-1
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.17.1"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.17.1 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.17.1
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.17.1 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.17.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.17.1 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.17.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-17-1-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.17.1-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.17.1-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.17.1-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.17.1-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.17.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.17.1-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.17.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-17-1-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.17.1-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.17.1-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.17.1-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.17.1-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.17.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.17.1-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.17.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-17-1-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.17.1-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.17.1-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.17.1-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.17.1-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.17.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.17.1-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.17.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-17-1-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.17.1-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.17.1-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.17.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.17.1-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.17.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.17.1-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.17.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-17-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-16-1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.16.1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.16.1-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-16-1
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.16.1"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.16.1 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.16.1
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.16.1 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.16.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.16.1 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.16.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-16-1-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.16.1-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.16.1-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.16.1-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.16.1-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.16.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.16.1-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.16.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-16-1-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.16.1-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.16.1-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.16.1-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.16.1-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.16.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.16.1-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.16.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-16-1-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.16.1-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.16.1-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.16.1-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.16.1-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.16.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.16.1-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.16.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-16-1-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.16.1-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.16.1-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.16.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.16.1-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.16.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.16.1-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.16.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-16-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-15-0:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.15.0-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.15.0-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-15-0
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.15.0"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.15.0 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.15.0
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.15.0 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.15.0
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.15.0 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.15.0
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-15-0-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.15.0-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.15.0-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.15.0-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.15.0-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.15.0-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.15.0-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.15.0-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-15-0-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.15.0-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.15.0-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.15.0-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.15.0-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.15.0-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.15.0-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.15.0-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-15-0-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.15.0-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.15.0-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.15.0-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.15.0-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.15.0-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.15.0-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.15.0-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-15-0-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.15.0-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.15.0-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.15.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.15.0-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.15.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.15.0-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.15.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-15-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-14-1:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.14.1-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.14.1-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-14-1
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.14.1"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.14.1 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.14.1
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.14.1 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.14.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.14.1 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.14.1
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-14-1-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.14.1-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.14.1-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.14.1-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.14.1-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.14.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.14.1-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.14.1-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-14-1-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.14.1-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.14.1-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.14.1-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.14.1-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.14.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.14.1-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.14.1-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-14-1-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.14.1-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.14.1-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.14.1-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.14.1-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.14.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.14.1-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.14.1-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-14-1-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.14.1-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.14.1-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.14.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.14.1-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.14.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.14.1-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.14.1-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-14-1-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-13-0:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.13.0-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.13.0-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-13-0
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.13.0"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.13.0 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.13.0
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.13.0 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.13.0
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.13.0 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.13.0
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-13-0-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.13.0-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.13.0-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.13.0-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.13.0-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.13.0-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.13.0-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.13.0-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-13-0-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.13.0-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.13.0-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.13.0-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.13.0-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.13.0-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.13.0-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.13.0-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-13-0-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.13.0-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.13.0-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.13.0-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.13.0-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.13.0-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.13.0-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.13.0-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-13-0-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.13.0-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.13.0-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.13.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.13.0-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.13.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.13.0-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.13.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-13-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-12-0:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.12.0-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.12.0-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-12-0
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.12.0"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.12.0 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.12.0
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.12.0 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.12.0
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.12.0 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.12.0
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-12-0-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.12.0-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.12.0-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.12.0-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.12.0-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.12.0-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.12.0-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.12.0-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-12-0-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.12.0-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.12.0-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.12.0-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.12.0-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.12.0-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.12.0-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.12.0-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-12-0-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.12.0-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.12.0-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.12.0-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.12.0-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.12.0-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.12.0-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.12.0-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-12-0-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.12.0-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.12.0-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.12.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.12.0-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.12.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.12.0-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.12.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-12-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
build-4-11-0:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- 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@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4.11.0-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-4.11.0-
${{ runner.os }}-buildx-
- name: Login to Docker Hub registry
# Run on master and tags
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
# This step generates the docker tags
- name: Prepare
id: prep-4-11-0
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.11.0"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.11.0 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.11.0
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.11.0 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.11.0
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.11.0 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.11.0
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-11-0-docker
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.11.0-docker"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.11.0-docker - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.11.0-docker
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.11.0-docker - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.11.0-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.11.0-docker - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.11.0-docker
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0-docker.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-11-0-docker-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.11.0-docker-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.11.0-docker-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.11.0-docker-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.11.0-docker-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.11.0-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.11.0-docker-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.11.0-docker-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-11-0-docker-rootless
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.11.0-docker-rootless"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.11.0-docker-rootless - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.11.0-docker-rootless
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.11.0-docker-rootless - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.11.0-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.11.0-docker-rootless - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.11.0-docker-rootless
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# This step generates the docker tags
- name: Prepare
id: prep-4-11-0-docker-rootless-go-1-20-14
run: |
set -e
# Get ref, i.e. <branch_name> from refs/heads/<branch_name>, or <tag-name> from refs/tags/<tag_name>. E.g. 'master' or 'v0.0.0'
REF=$( echo "${GITHUB_REF}" | rev | cut -d '/' -f 1 | rev )
# Get short commit hash E.g. 'abc0123'
SHA=$( echo "${GITHUB_SHA}" | cut -c1-7 )
# Generate docker image tags
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
VARIANT="4.11.0-docker-rootless-go-1.20.14"
REF_VARIANT="${REF}-${VARIANT}"
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
# Pass variables to next step
echo "VARIANT_BUILD_DIR=$VARIANT_BUILD_DIR" >> $GITHUB_OUTPUT
echo "VARIANT=$VARIANT" >> $GITHUB_OUTPUT
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
- name: 4.11.0-docker-rootless-go-1.20.14 - Build (PRs)
# Run only on pull requests
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: variants/4.11.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: false
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.11.0-docker-rootless-go-1.20.14 - Build and push (master)
# Run only on master
if: github.ref == 'refs/heads/master'
uses: docker/build-push-action@v5
with:
context: variants/4.11.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
- name: 4.11.0-docker-rootless-go-1.20.14 - Build and push (release)
if: startsWith(github.ref, 'refs/tags/')
uses: docker/build-push-action@v5
with:
context: variants/4.11.0-docker-rootless-go-1.20.14
platforms: linux/amd64
push: true
tags: |
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-14.outputs.VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-14.outputs.REF_VARIANT }}
${{ github.repository }}:${{ steps.prep-4-11-0-docker-rootless-go-1-20-14.outputs.REF_SHA_VARIANT }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
update-draft-release:
needs:
- build-4-95-3
- build-4-93-1
- build-4-92-2
- build-4-91-1
- build-4-90-3
- build-4-89-1
- build-4-23-1
- build-4-22-1
- build-4-21-2
- build-4-20-1
- build-4-19-1
- build-4-18-0
- build-4-17-1
- build-4-16-1
- build-4-15-0
- build-4-14-1
- build-4-13-0
- build-4-12-0
- build-4-11-0
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter.yml
publish: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-draft-release:
needs:
- build-4-95-3
- build-4-93-1
- build-4-92-2
- build-4-91-1
- build-4-90-3
- build-4-89-1
- build-4-23-1
- build-4-22-1
- build-4-21-2
- build-4-20-1
- build-4-19-1
- build-4-18-0
- build-4-17-1
- build-4-16-1
- build-4-15-0
- build-4-14-1
- build-4-13-0
- build-4-12-0
- build-4-11-0
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter.yml
publish: true
name: ${{ github.ref_name }} # E.g. 'master' or 'v1.2.3'
tag: ${{ github.ref_name }} # E.g. 'master' or 'v1.2.3'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update-dockerhub-description:
needs:
- build-4-95-3
- build-4-93-1
- build-4-92-2
- build-4-91-1
- build-4-90-3
- build-4-89-1
- build-4-23-1
- build-4-22-1
- build-4-21-2
- build-4-20-1
- build-4-19-1
- build-4-18-0
- build-4-17-1
- build-4-16-1
- build-4-15-0
- build-4-14-1
- build-4-13-0
- build-4-12-0
- build-4-11-0
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_REGISTRY_USER }}
password: ${{ secrets.DOCKERHUB_REGISTRY_PASSWORD }}
repository: ${{ github.repository }}
short-description: ${{ github.event.repository.description }}