File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Publish Docker image
2+ on :
3+ push :
4+ branches : ['release']
5+
6+ env :
7+ REGISTRY : ghcr.io
8+ IMAGE_NAME : ${{ github.repository }}
9+
10+ jobs :
11+ build-and-push-image :
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : read
15+ packages : write
16+
17+ steps :
18+ - name : Checkout repository
19+ uses : actions/checkout@v3
20+
21+ - name : Log in to the Container registry
22+ uses : docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
23+ with :
24+ registry : ${{ env.REGISTRY }}
25+ username : ${{ github.actor }}
26+ password : ${{ secrets.GITHUB_TOKEN }}
27+
28+ - name : Extract metadata (tags, labels) for Docker
29+ id : meta
30+ uses : docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
31+ with :
32+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
33+
34+ - name : Build and push Docker image
35+ uses : docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
36+ with :
37+ context : .
38+ push : true
39+ tags : ${{ steps.meta.outputs.tags }}
40+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments