Skip to content

Commit

Permalink
Added CI
Browse files Browse the repository at this point in the history
  • Loading branch information
meffmadd committed Nov 19, 2024
1 parent a07c3c0 commit fa6fde9
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/docker-build-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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"

0 comments on commit fa6fde9

Please sign in to comment.