Skip to content

Update Dockerfile

Update Dockerfile #8

Workflow file for this run

name: Publish image with plugin
on:
push:
branches:
- main
workflow_dispatch:
jobs:
push-plugin:
runs-on: ubuntu-latest
steps:
- uses: neoforged/actions/checkout@main
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Install NPM Dependencies
run: npm ci
- name: Build Plugin
run: npm run build
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Create Docker Metadata
id: docker_metadata
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=1.0.0
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
- name: Build Docker Image
uses: docker/build-push-action@v6
with:
context: .
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
tags: ${{ steps.docker_metadata.outputs.tags }}
labels: ${{ steps.docker_metadata.outputs.labels }}