Skip to content

Add dockerfile

Add dockerfile #2

Workflow file for this run

on:
push:
branches:
- main
- dev
tags:
- "v*.*.*"
pull_request:
branches:
- main
- dev
jobs:
build:
name: Build
runs-on: ubuntu-24.04
steps:
- name: Check Out Repo
uses: actions/checkout@v4
- name: Docker metadata
id: metadata
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=ref,event=branch
type=ref,event=tag
- name: Set up 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.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
file: Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.metadata.outputs.tags }}
cache-from: type=gha,scope=main
cache-to: type=gha,mode=max,scope=main
platforms: linux/amd64,linux/arm64