File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docker
2+
3+ on :
4+ push :
5+ tags : ["v*.*.*"]
6+
7+ env :
8+ REGISTRY : ghcr.io
9+ IMAGE_NAME : ${{ github.repository }}
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ permissions :
15+ contents : read
16+ packages : write
17+
18+ steps :
19+ - name : Checkout repository
20+ uses : actions/checkout@v3
21+
22+ - name : Set up Docker Buildx
23+ uses : docker/setup-buildx-action@v2
24+
25+ - name : Log into registry ${{ env.REGISTRY }}
26+ 27+ with :
28+ registry : ${{ env.REGISTRY }}
29+ username : ${{ github.actor }}
30+ password : ${{ secrets.GITHUB_TOKEN }}
31+
32+ - name : Extract Docker metadata
33+ id : meta
34+ uses : docker/metadata-action@v4
35+ with :
36+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
37+
38+ - name : Build and push Docker image
39+ id : build-and-push
40+ uses : docker/build-push-action@v3
41+ with :
42+ context : .
43+ file : ./Dockerfile.build
44+ push : true
45+ tags : ${{ steps.meta.outputs.tags }}
46+ labels : ${{ steps.meta.outputs.labels }}
47+ cache-from : type=gha
48+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments