Skip to content

Added CI

Added CI #1

name: Docker Build and Publish to GHCR
on:
push:
branches:
- main
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest
labels: |
com.github.repository=${{ github.repository }}
com.github.sha=${{ github.sha }}
- name: Image Details
run: |
echo "Image URL: ghcr.io/${{ github.repository }}:latest"
echo "Repository: $GITHUB_REPOSITORY"
echo "SHA: $GITHUB_SHA"