Skip to content

Add GHCR publish workflow for Morphic Render image. #1

Add GHCR publish workflow for Morphic Render image.

Add GHCR publish workflow for Morphic Render image. #1

Workflow file for this run

name: Publish Morphic image
on:
workflow_dispatch:
push:
branches: [image-source]
paths:
- 'Dockerfile'
- 'package.json'
- 'bun.lock'
- 'app/**'
- 'lib/**'
- 'components/**'
- 'public/**'
- 'drizzle/**'
- '.github/workflows/publish-image.yml'
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_NAME: render-examples/morphic
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
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 }}
tags: |
type=sha,prefix=,format=short
type=raw,value=latest
type=raw,value=0.1.0
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max