@@ -3,7 +3,7 @@ name: Image Build and Push
33on :
44 push :
55 branches :
6- - development
6+ - ghcr-workflow
77
88jobs :
99 push-to-dockerhub :
@@ -16,18 +16,37 @@ jobs:
1616 - name : Exact branch name
1717 run : echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
1818
19- - name : Login to DockerHub
19+ # - name: Login to DockerHub
20+ # uses: docker/login-action@v3
21+ # with:
22+ # username: ${{ secrets.XXX_USERNAME }}
23+ # password: ${{ secrets.XXX_PWORD }}
24+
25+ - name : Login to GHCR
2026 uses : docker/login-action@v3
2127 with :
22- username : ${{ secrets.XXX_USERNAME }}
23- password : ${{ secrets.XXX_PWORD }}
28+ registry : ghcr.io
29+ username : ${{ github.actor }}
30+ password : ${{ secrets.GITHUB_TOKEN }}
31+
32+ # - name: Build and push Docker image
33+ # uses: docker/build-push-action@v6
34+ # with:
35+ # context: .
36+ # push: true
37+ # file: ./Dockerfile
38+ # platforms: linux/amd64
39+ # # see https://github.com/docker/build-push-action/issues/276 for syntax help
40+ # tags: underworldcode/underworld3:${{ env.BRANCH }} #-$(date +%s)
2441
25- - name : Build and push Docker image
42+ - name : Build and push Container to GHCR
2643 uses : docker/build-push-action@v6
2744 with :
2845 context : .
2946 push : true
30- file : ./Dockerfile
47+ file : ./docs/developer/container/Containerfile
3148 platforms : linux/amd64
3249 # see https://github.com/docker/build-push-action/issues/276 for syntax help
33- tags : underworldcode/underworld3:${{ env.BRANCH }} # -$(date +%s)
50+ # tags: ghcr.io/underworldcode/underworld3:${{ env.BRANCH }} #-$(date +%s)
51+ # NOTE: change this one to underworldcode
52+ tags : ghcr.io/${{ github.actor }}/underworld3:${{ env.BRANCH }} # -$(date +%s)
0 commit comments