File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 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"
You can’t perform that action at this time.
0 commit comments