Skip to content

Build judge image

Build judge image #32

Workflow file for this run

name: "Build judge image"
on:
schedule:
- cron: "0 12 * * 1"
push:
branches: [main]
paths:
- judge/**
- .github/workflows/judge.yml
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/judge-server
jobs:
build-and-push:
name: Build and push to ghcr.io
runs-on: ubuntu-22.04-arm
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Push to DockerHub
uses: docker/build-push-action@v6
with:
platforms: linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
context: judge
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}