7272 fi
7373 echo "tag=$TAG" >> $GITHUB_OUTPUT
7474 echo "TAG=$TAG" >> $GITHUB_ENV
75+ OWNER="${{ github.repository_owner }}"
76+ echo "GH_REGISTRY=ghcr.io/${OWNER,,}/mfc" >> $GITHUB_ENV
7577 git clone --branch "$BRANCH" --depth 1 ${{ github.server_url }}/${{ github.repository }}.git mfc
7678
7779 - name : Stage
@@ -108,7 +110,7 @@ jobs:
108110 org.opencontainers.image.source=https://github.com/${{ github.repository }}
109111 tags : |
110112 ${{ secrets.DOCKERHUB_USERNAME }}/mfc:${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner }}
111- ghcr.io/ ${{ github.repository_owner }}/mfc :${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner }}
113+ ${{ env.GH_REGISTRY }}:${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner }}
112114 push : true
113115
114116 - name : Build and push image (gpu)
@@ -130,7 +132,7 @@ jobs:
130132 org.opencontainers.image.source=https://github.com/${{ github.repository }}
131133 tags : |
132134 ${{ secrets.DOCKERHUB_USERNAME }}/mfc:${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner }}
133- ghcr.io/ ${{ github.repository_owner }}/mfc :${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner }}
135+ ${{ env.GH_REGISTRY }}:${{ env.TAG }}-${{ matrix.config.name }}-${{ matrix.config.runner }}
134136 push : true
135137
136138 - name : Build and push image (amd)
@@ -153,12 +155,15 @@ jobs:
153155 org.opencontainers.image.source=https://github.com/${{ github.repository }}
154156 tags : |
155157 ${{ secrets.DOCKERHUB_USERNAME }}/mfc:${{ env.TAG }}-amd-ubuntu-22.04
156- ghcr.io/ ${{ github.repository_owner }}/mfc :${{ env.TAG }}-amd-ubuntu-22.04
158+ ${{ env.GH_REGISTRY }}:${{ env.TAG }}-amd-ubuntu-22.04
157159 push : true
158160
159161 manifests :
160162 runs-on : ubuntu-latest
161163 needs : Container
164+ environment :
165+ name : containers
166+ url : https://hub.docker.com/r/mflowcode/mfc
162167 steps :
163168 - name : Login to Docker Hub
164169 uses : docker/login-action@v3
@@ -176,12 +181,17 @@ jobs:
176181 - name : Setup Buildx
177182 uses : docker/setup-buildx-action@v3
178183
184+ - name : Set GHCR registry (lowercase)
185+ run : |
186+ OWNER="${{ github.repository_owner }}"
187+ echo "GH_REGISTRY=ghcr.io/${OWNER,,}/mfc" >> $GITHUB_ENV
188+
179189 - name : Create and Push Manifest Lists
180190 env :
181191 TAG : ${{ needs.Container.outputs.tag }}
182192 DH : ${{ secrets.DOCKERHUB_USERNAME }}/mfc
183- GH : ghcr.io/${{ github.repository_owner }}/mfc
184193 run : |
194+ GH="${{ env.GH_REGISTRY }}"
185195 for R in "$DH" "$GH"; do
186196 docker buildx imagetools create -t $R:$TAG-cpu $R:$TAG-cpu-ubuntu-22.04 $R:$TAG-cpu-ubuntu-22.04-arm
187197 docker buildx imagetools create -t $R:$TAG-gpu $R:$TAG-gpu-ubuntu-22.04 $R:$TAG-gpu-ubuntu-22.04-arm
@@ -193,8 +203,8 @@ jobs:
193203 env :
194204 TAG : ${{ needs.Container.outputs.tag }}
195205 DH : ${{ secrets.DOCKERHUB_USERNAME }}/mfc
196- GH : ghcr.io/${{ github.repository_owner }}/mfc
197206 run : |
207+ GH="${{ env.GH_REGISTRY }}"
198208 for R in "$DH" "$GH"; do
199209 docker buildx imagetools create -t $R:latest-cpu $R:$TAG-cpu-ubuntu-22.04 $R:$TAG-cpu-ubuntu-22.04-arm
200210 docker buildx imagetools create -t $R:latest-gpu $R:$TAG-gpu-ubuntu-22.04 $R:$TAG-gpu-ubuntu-22.04-arm
0 commit comments