Skip to content

fix(ponder): image build on main (#12) #7

fix(ponder): image build on main (#12)

fix(ponder): image build on main (#12) #7

Workflow file for this run

name: Ponder Image
on:
push:
branches: [main]
tags: ["v*"]
paths:
- ".github/workflows/ponder-image.yml"
- ".dockerignore"
- "apps/ponder/**"
- "packages/repair-db/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- "tsconfig.json"
pull_request:
paths:
- ".github/workflows/ponder-image.yml"
- ".dockerignore"
- "apps/ponder/**"
- "packages/repair-db/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
- "tsconfig.json"
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build:
name: build ponder image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set image name
run: echo "IMAGE_NAME=ghcr.io/${GITHUB_REPOSITORY,,}-ponder" >> "$GITHUB_ENV"
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=ref,event=tag
type=sha,prefix=sha-
- uses: docker/build-push-action@v6
with:
context: .
file: apps/ponder/Dockerfile
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