File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Create a Docker image from the software and publish it
2+
3+ on :
4+ push :
5+ branches : ['main']
6+
7+ env :
8+ REGISTRY : ghcr.io
9+ IMAGE_NAME : ${{ github.repository }}
10+
11+ jobs :
12+ build-and-push-image :
13+ runs-on : ubuntu-latest
14+ # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job.
15+ permissions :
16+ contents : read
17+ packages : write
18+ id-token : write
19+ steps :
20+ - name : Checkout repository
21+ uses : actions/checkout@v4
22+ - name : Log in to the Container registry
23+ uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
24+ with :
25+ registry : ${{ env.REGISTRY }}
26+ username : ${{ github.actor }}
27+ password : ${{ secrets.GITHUB_TOKEN }}
28+ - name : Build and push Docker image
29+ id : push
30+ uses : docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
31+ with :
32+ context : " {{defaultContext}}:software"
33+ push : true
34+ tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
You can’t perform that action at this time.
0 commit comments