Skip to content

Merge pull request #129 from walnuts1018/renovate/eslint-monorepo #380

Merge pull request #129 from walnuts1018/renovate/eslint-monorepo

Merge pull request #129 from walnuts1018/renovate/eslint-monorepo #380

Workflow file for this run

name: Build Docker Image
on:
push:
branches:
- main
paths-ignore:
- "README.md"
workflow_dispatch:
jobs:
build:
name: Build Walnuts.dev Docker Image
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Cache node_modules, .next/cache, .npm
uses: actions/cache@v4
with:
path: |
node_modules
.next
.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
- name: setup-node
uses: actions/setup-node@v4
with:
node-version: 22
- name: install
run: yarn install
- name: build
run: yarn build
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: walnuts1018
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
version: latest
- name: Build and push Docker images
uses: docker/build-push-action@v6
with:
push: true
context: .
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
ghcr.io/walnuts1018/walnuts.dev:latest
ghcr.io/walnuts1018/walnuts.dev:${{ github.sha }}-${{ github.run_number }}