File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Docker
2+ on :
3+ push :
4+ branches :
5+ - main
6+ paths-ignore :
7+ - ' .*'
8+ - ' **.md'
9+
10+ env :
11+ IMAGE_NAME : ${{ github.repository }}
12+
13+ jobs :
14+ publish :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+ - name : Extract metadata for Docker
20+ id : meta
21+ uses : docker/metadata-action@v5
22+ with :
23+ images : ghcr.io/${{ env.IMAGE_NAME }}
24+ - name : Login to GitHub Container Registry
25+ uses : docker/login-action@v3
26+ with :
27+ registry : ghcr.io
28+ username : ${{ github.actor }}
29+ password : ${{ secrets.GITHUB_TOKEN }}
30+ - name : Build and Push Docker image
31+ uses : docker/build-push-action@v6
32+ with :
33+ context : .
34+ file : Dockerfile
35+ push : true
36+ tags : ${{ steps.meta.outputs.tags }}
37+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments