File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish container image
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ publish_to_registry :
9+ name : Build and push image to registry
10+ runs-on : ubuntu-latest
11+ env :
12+ ICR_NAMESPACE : solution-tutorials
13+ ICR_REPOSITORY : tutorial-cloud-sql-database
14+ steps :
15+ - name : Check out the repo
16+ uses : actions/checkout@v2
17+
18+ - name : Log in to Container Registry
19+ uses : docker/login-action@v1.10.0
20+ with :
21+ registry : icr.io
22+ username : ${{ secrets.ICR_USER }}
23+ password : ${{ secrets.ICR_TOKEN }}
24+
25+ - name : Extract metadata (tags, labels) for Docker
26+ id : meta
27+ uses : docker/metadata-action@v3.6.2
28+ with :
29+ images : icr.io/${{ env.ICR_NAMESPACE }}/${{ env.ICR_REPOSITORY }}
30+
31+ - name : Build and push image
32+ uses : docker/build-push-action@v2.8.0
33+ with :
34+ context : ./app
35+ file : ./app/Dockerfile
36+ push : true
37+ tags : ${{ steps.meta.outputs.tags }}
38+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments