Skip to content

Update golang:1.23.4-alpine Docker digest to 9a31ef0 #548

Update golang:1.23.4-alpine Docker digest to 9a31ef0

Update golang:1.23.4-alpine Docker digest to 9a31ef0 #548

Workflow file for this run

name: "test pull request"
on:
push:
branches-ignore:
- "main"
pull_request:
branches:
- "main"
env:
IMAGE_NAME: "drone-runner-docker"
RUNNER_VERSION: "v1.8.3" # renovate: datasource=github-tags depName=drone-runners/drone-runner-docker
TMATE_VERSION: "2.4.0" # renovate: datasource=github-tags depName=tmate-io/tmate
jobs:
build-multi-arch-images:
runs-on: ubuntu-latest
strategy:
matrix:
platform:
- arm/v6
- arm/v7
- arm64
- amd64
services:
registry:
image: registry:2@sha256:543dade69668e02e5768d7ea2b0aa4fae6aa7384c9a5a8dbecc2be5136079ddb
ports:
- 5000:5000
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3.7.1
with:
driver-opts: network=host
- name: Set docker build args
id: build_args
run: |
if [ $(echo "${{ matrix.platform }}" | grep -F "arm/") ]; then
echo "arch=arm" >> $GITHUB_OUTPUT
echo "arch_aux=32" >> $GITHUB_OUTPUT
if [ "${{ matrix.platform }}" == "arm/v6" ]; then
echo "variant=v6" >> $GITHUB_OUTPUT
elif [ "${{ matrix.platform }}" == "arm/v7" ]; then
echo "variant=v7" >> $GITHUB_OUTPUT
fi
elif [ "${{ matrix.platform }}" == "arm64" ]; then
echo "arch=arm64" >> $GITHUB_OUTPUT
echo "variant=v8" >> $GITHUB_OUTPUT
else
echo "arch=amd64" >> $GITHUB_OUTPUT
fi
- name: Normalise tags
id: normalise_tags
run: |
if [ "${{ matrix.platform }}" == "arm/v6" ]; then
echo "TAGS=arm32v6" >> $GITHUB_OUTPUT
elif [ "${{ matrix.platform }}" == "arm/v7" ]; then
echo "TAGS=arm32v7" >> $GITHUB_OUTPUT
elif [ "${{ matrix.platform }}" == "arm64" ]; then
echo "TAGS=arm64" >> $GITHUB_OUTPUT
else
echo "TAGS=${{ matrix.platform }}" >> $GITHUB_OUTPUT
fi
- name: Build image
id: build
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0
with:
context: .
platforms: linux/${{ matrix.platform }}
push: true
tags: |
localhost:5000/${{ env.IMAGE_NAME }}:${{ env.RUNNER_VERSION }}-linux-${{ steps.normalise_tags.outputs.TAGS }}-test
file: Dockerfile
build-args: |
RUNNER_VERSION=${{ env.RUNNER_VERSION }}
TMATE_VERSION=${{ env.TMATE_VERSION }}
ARCH=${{ steps.build_args.outputs.arch }}
ARCH_AUX=${{ steps.build_args.outputs.arch_aux }}
VARIANT=${{ steps.build_args.outputs.variant }}
- name: Test image
run: |
docker run --rm --platform linux/${{ matrix.platform }} localhost:5000/${{ env.IMAGE_NAME }}:${{ env.RUNNER_VERSION }}-linux-${{ steps.normalise_tags.outputs.TAGS }}-test@${{ steps.build.outputs.digest }} --help