Skip to content

Bump moq-clock to test again. #4

Bump moq-clock to test again.

Bump moq-clock to test again. #4

Workflow file for this run

name: docker
on:
push:
tags:
- 'moq-relay-v*'
- 'moq-karp-v*'
- 'moq-clock-v*'
env:
REGISTRY: docker.io/kixelated
jobs:
deploy:
name: Publish Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- uses: actions/checkout@v3
# Figure out the docker image based on the tag
- id: parse
run: |
ref=${GITHUB_REF#refs/tags/}
if [[ "$ref" =~ ^(moq-[a-z]+)-v([0-9.]+)$ ]]; then
target=${BASH_REMATCH[1]}
version=${BASH_REMATCH[2]}
echo "target=$target" >> $GITHUB_OUTPUT
echo "version=$version" >> $GITHUB_OUTPUT
else
echo "Tag format not recognized." >&2
exit 1
fi
# I'm paying for Depot for faster ARM builds.
- uses: depot/setup-action@v1
# Login to docker.io
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Extract version from the tag
- id: version
run: echo "version=${GITHUB_REF##refs/tags/moq-relay-v}" >> $GITHUB_OUTPUT
# Build and push Docker image with Depot
- uses: depot/build-push-action@v1
with:
project: r257ctfqm6
context: .
push: true
target: ${{ steps.parse.outputs.target }}
tags: |
${{ env.REGISTRY }}/${{ steps.parse.outputs.target }}:${{ steps.version.outputs.version }}
${{ env.REGISTRY }}/${{ steps.parse.outputs.target }}:latest
platforms: linux/amd64,linux/arm64