Skip to content

Make matrix checkboxes bigger #9

Make matrix checkboxes bigger

Make matrix checkboxes bigger #9

Workflow file for this run

name: Build and Push Image
on:
push:
branches:
- "**"
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: cabinetoffice/fb-runner
jobs:
build-fb-runner:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compute tag
id: tag
shell: bash
run: |
set -euo pipefail
sha="${GITHUB_SHA}"
short_sha="${sha:0:7}"
ref="${GITHUB_REF_NAME}"
if [[ "$ref" == "main" ]]; then
tag="main-${short_sha}"
else
# Sanitize branch name for Docker tag compatibility.
safe_ref="$(echo "$ref" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9_.-]/-/g')"
tag="branch-${safe_ref}-${short_sha}"
fi
echo "value=$tag" >> "$GITHUB_OUTPUT"
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tag.outputs.value }}