Skip to content

Add additional LaTeX packages to Docker container #5

Add additional LaTeX packages to Docker container

Add additional LaTeX packages to Docker container #5

Workflow file for this run

name: 🐳 Build & Push Docker Image
on:
push:
branches: [main]
paths:
- 'tools/Dockerfile'
- '.github/workflows/docker-image.yml'
# Allow manual triggering
workflow_dispatch:
inputs:
tag:
description: 'Tag for the Docker image'
required: false
default: 'latest'
type: string
env:
REGISTRY: ghcr.io
IMAGE_NAME: carbondirect/boost/boost-builder
jobs:
build-and-push:
name: 🏗️ Build Docker Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix={{branch}}-
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=${{ inputs.tag || 'latest' }},enable=${{ github.event_name == 'workflow_dispatch' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./tools/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Verify image
run: |
echo "🐳 Docker image built and pushed successfully!"
echo "📦 Image tags:"
echo "${{ steps.meta.outputs.tags }}"
echo ""
echo "🔧 To use this image in workflows:"
echo "container: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"