Skip to content

Polish build scripts #5

Polish build scripts

Polish build scripts #5

name: Publish Nightly Docker Image
on:
push:
branches:
- master
permissions:
contents: read
packages: write
jobs:
push-to-ghcr:
name: Build and Push Docker Image to GHCR
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to the GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=nightly
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./switchbot-mcp-server/src/main/docker/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}