Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build & Push Docker image to GHCR

on:
push:
branches: [main] # or your default branch
workflow_dispatch: # allow manual trigger

permissions:
contents: read
packages: write # needed to push to GHCR

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker image
run: |
docker build -t ghcr.io/${{ github.repository_owner }}/class-compass-server-mini:latest .

- name: Push image to GHCR
run: |
docker push ghcr.io/${{ github.repository_owner }}/class-compass-server-mini:latest
Loading