Merge pull request #21 from tminaorg/forward-host-as-origin #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker CI | |
on: | |
push: | |
branches: ['main'] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: read | |
steps: | |
- uses: actions/checkout@v4 | |
# install deps (using npm until bun fixes bug for static assets) | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: 'npm' | |
- run: npm ci | |
# build project | |
- uses: oven-sh/setup-bun@v1 | |
- run: bun run build | |
# setup docker (arm64) | |
- uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- uses: docker/setup-buildx-action@v3 | |
- uses: docker/metadata-action@v5 | |
id: meta | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
# build docker | |
- uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./docker/Dockerfile | |
push: false | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
platforms: |- | |
linux/amd64 | |
linux/arm64 |