Skip to content

Commit fa6fde9

Browse files
committed
Added CI
1 parent a07c3c0 commit fa6fde9

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Docker Build and Publish to GHCR
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Login to GitHub Container Registry
16+
uses: docker/login-action@v2
17+
with:
18+
username: ${{ github.actor }}
19+
password: ${{ secrets.GITHUB_TOKEN }}
20+
21+
- name: Build and Push Docker Image
22+
uses: docker/build-push-action@v3
23+
with:
24+
context: .
25+
push: true
26+
tags: ghcr.io/${{ github.repository }}:latest
27+
labels: |
28+
com.github.repository=${{ github.repository }}
29+
com.github.sha=${{ github.sha }}
30+
31+
- name: Image Details
32+
run: |
33+
echo "Image URL: ghcr.io/${{ github.repository }}:latest"
34+
echo "Repository: $GITHUB_REPOSITORY"
35+
echo "SHA: $GITHUB_SHA"

0 commit comments

Comments
 (0)