File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Publish Docker Image
2+
3+ on :
4+ push :
5+ tags :
6+ - ' release*'
7+
8+ jobs :
9+ build-and-push :
10+ runs-on : ubuntu-latest
11+
12+ permissions :
13+ contents : read
14+ packages : write
15+ id-token : write
16+
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@v3
20+
21+ - name : Log in to GitHub Container Registry
22+ uses : docker/login-action@v3
23+ with :
24+ registry : ghcr.io
25+ username : ${{ github.actor }}
26+ password : ${{ secrets.GITHUB_TOKEN }}
27+
28+ - name : Set up Docker image name
29+ id : vars
30+ run : echo "IMAGE_NAME=ghcr.io/${{ github.repository }}" >> $GITHUB_ENV
31+
32+ - name : Build Docker image
33+ run : |
34+ docker build -t $IMAGE_NAME:${{ github.ref_name }} .
35+
36+ - name : Push Docker image
37+ run : |
38+ docker push $IMAGE_NAME:${{ github.ref_name }}
You can’t perform that action at this time.
0 commit comments