mirror of
https://github.com/Kizuren/QuizConnect.git
synced 2025-12-21 13:06:15 +01:00
41 lines
No EOL
873 B
YAML
41 lines
No EOL
873 B
YAML
name: Build Docker Image
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'Server/**'
|
|
- '.github/workflows/build.yml'
|
|
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to GitHub Container Registry
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./Server
|
|
file: ./Server/Dockerfile
|
|
push: true
|
|
platforms: linux/amd64, linux/arm64/v8
|
|
tags: ghcr.io/marcus7i/quizconnect:latest |