Skip to content

edit sidebar

edit sidebar #25

Workflow file for this run

name: Build & Push (GHCR)
on:
workflow_dispatch: {}
push:
branches: ["main"]
paths:
- "server/**"
- "client/**"
- "pyworker/**"
- "docker-bake.hcl"
- ".github/workflows/build.yml"
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to GHCR
run: echo "${{ github.token }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Setup QEMU (for multi-arch)
uses: docker/setup-qemu-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Setup Buildx
uses: docker/setup-buildx-action@v3
- name: Build & Push (latest + short-sha)
if: github.ref == 'refs/heads/main'
env:
REGISTRY: ghcr.io/cornellev
GIT_SHA: ${{ github.sha }}
run: |
SHORT="${GIT_SHA::7}"
TAGS="latest,${SHORT}"
REGISTRY="$REGISTRY" TAG="$TAGS" docker buildx bake \
-f docker-bake.hcl \
--push \
--set *.platform=linux/amd64,linux/arm64