Skip to content

new release

new release #4

name: Build Docker testrunner container on new tag
on:
push:
tags:
- 'testrunner-v*.*.*'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract version
id: extract_version
run: |
VERSION_TAG=${GITHUB_REF#refs/tags/}
echo "Git tag: $VERSION_TAG"
VERSION=${VERSION_TAG#testrunner-v}
echo "Full version without 'testrunner-v': $VERSION"
MAJOR_VERSION=${VERSION%%.*}
echo "Major version: $MAJOR_VERSION"
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
echo "MAJOR_VERSION=$MAJOR_VERSION" >> $GITHUB_OUTPUT
-
name: Build and push sitespeed.io
uses: docker/build-push-action@v6
with:
context: ./testrunner/
file: ./testrunner/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
provenance: false
tags: |
sitespeedio/testrunner:${{steps.extract_version.outputs.VERSION}}
sitespeedio/testrunner:${{steps.extract_version.outputs.MAJOR_VERSION}}
sitespeedio/testrunner:latest