File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,46 +2,55 @@ name: docker
22
33on :
44 push :
5- branches : ['main']
6- tags : ['v*']
7-
8- env :
9- REGISTRY : ghcr.io
10- IMAGE_NAME : ${{ github.repository }}
5+ branches : [ 'main' ]
6+ tags : [ 'v*' ]
117
128jobs :
139 build-and-push-main :
1410 runs-on : ubuntu-latest
11+
1512 permissions :
1613 contents : read
1714 packages : write
1815 attestations : write
1916 id-token : write
17+
2018 steps :
2119 - name : Check out the repo
2220 uses : actions/checkout@v5
21+
2322 - name : Docker meta
2423 id : meta
2524 uses : docker/metadata-action@v5
2625 with :
27- images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
26+ images : |
27+ defnull/bbblb
28+ ghcr.io/defnull/bbblb
2829 tags : |
2930 type=raw,value=latest,enable={{is_default_branch}}
3031 type=ref,event=branch
3132 type=semver,pattern={{version}}
3233 type=semver,pattern={{major}}.{{minor}}
3334 type=semver,pattern={{major}}
34- - name : Login to Image Registry
35+
36+ - name : Login to ghcr.io
3537 uses : docker/login-action@v3
3638 with :
37- registry : ${{ env.REGISTRY }}
39+ registry : ghcr.io
3840 username : ${{ github.actor }}
3941 password : ${{ secrets.GITHUB_TOKEN }}
42+
43+ - name : Login to Docker Hub
44+ uses : docker/login-action@v3
45+ with :
46+ username : defnull
47+ password : ${{ secrets.DOCKERHUB_TOKEN }}
48+
4049 - name : Build and push
4150 uses : docker/build-push-action@v6
4251 with :
4352 context : .
4453 file : docker/Dockerfile
4554 push : true
4655 tags : ${{ steps.meta.outputs.tags }}
47- labels : ${{ steps.meta.outputs.labels }}
56+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments