Skip to content

docs(readme): reconcile prose test count to 110 #56

docs(readme): reconcile prose test count to 110

docs(readme): reconcile prose test count to 110 #56

Workflow file for this run

name: docker
# Builds the image on every push to main, and again on every release tag.
# Tags emitted:
# - main pushes → ghcr.io/erphq/gnn:main + :sha-<short>
# - tag v0.2.0 → ghcr.io/erphq/gnn:0.2.0 + :0.2 + :latest
on:
push:
branches: [main]
tags: ["v*.*.*"]
pull_request:
branches: [main]
paths:
- "Dockerfile"
- ".github/workflows/docker.yml"
- "requirements.txt"
- "pyproject.toml"
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/gnn
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: setup buildx
uses: docker/setup-buildx-action@v3
- name: log in to ghcr
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: image 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=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
type=sha,prefix=sha-
- name: build (and push if not PR)
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max