@@ -155,10 +155,15 @@ jobs:
155155 needs : [matrix, build]
156156 runs-on : ubuntu-latest
157157 steps :
158+ - name : Checkout Repository
159+ 160+ with :
161+ fetch-depth : 0
162+
158163 - name : Download digests
159164160165 with :
161- path : /tmp/ digests
166+ path : .bake/ digests/
162167 pattern : digests-*
163168 merge-multiple : true
164169
@@ -180,86 +185,5 @@ jobs:
180185 password : ${{ secrets.DOCKER_PASSWORD }}
181186
182187 - name : Create manifest list and push
183- working-directory : /tmp/digests
184188 run : |
185- ls -laR
186-
187- # TODO:
188- # - name: Create manifest list and push
189- # working-directory: /tmp/digests
190- # run: |
191- # IMAGE_HASHES=$(printf '${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
192- # docker buildx imagetools create -t ${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest $IMAGE_HASHES
193- # if [[ "${{ contains(github.ref, 'refs/tags/') }}" = true ]]; then
194- # TAG=${GITHUB_REF#refs/*/}
195- # VERSION=${TAG#v}
196- # docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:${VERSION} $IMAGE_HASHES
197- # fi
198-
199- # - name: Inspect image
200- # run: |
201- # docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:latest
202-
203-
204-
205-
206- # manifest:
207- # name: Create and Push Manifest Lists
208- # needs: [matrix, build]
209- # # Only run when master or when tagging a version
210- # if: (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')) && github.event_name != 'pull_request'
211- # runs-on: ubuntu-latest
212- # steps:
213- # - name: Login to Docker Hub
214- # uses: docker/login-action@v3
215- # with:
216- # username: ${{ secrets.DOCKER_HUB_USERNAME }}
217- # password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
218-
219- # - name: Create and Push Manifest Lists
220- # run: |
221- # set -exuo pipefail
222-
223- # tags=("deps" "dev" "runtime" "cli")
224- # platforms=($(echo '${{ needs.matrix.outputs.platform_list }}' | jq -r '.[]'))
225-
226- # echo "Create all the tags by platform"
227-
228- # for tag in "${tags[@]}"; do
229- # echo "Creating manifest for tag: $tag"
230- # platform_tags=""
231- # for platform in "${platforms[@]}"; do
232- # platform_tag=$(echo "${platform}" | tr '/' '-')
233- # platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}"
234- # done
235- # echo "Creating manifest with tags: ${platform_tags}"
236- # docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag} ${platform_tags} --amend
237- # docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}
238- # done
239-
240- # echo "Create the latest tag"
241-
242- # cli_platform_tags=""
243- # for platform in "${platforms[@]}"; do
244- # platform_tag=$(echo "${platform}" | tr '/' '-')
245- # cli_platform_tags="${cli_platform_tags} ${DOCKER_USERNAME}/${IMAGE_NAME}:cli-${platform_tag}"
246- # done
247- # docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest ${cli_platform_tags} --amend
248- # docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:latest
249-
250- # if [[ "${{ startsWith(github.ref, 'refs/tags/') }}" = true ]]; then
251- # VERSION=${GITHUB_REF#refs/tags/v}
252-
253- # echo "Create the version ${VERSION} tag"
254-
255- # for tag in "${tags[@]}"; do
256- # platform_tags=""
257- # for platform in "${platforms[@]}"; do
258- # platform_tag=$(echo "${platform}" | tr '/' '-')
259- # platform_tags="${platform_tags} ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${tag}-${platform_tag}"
260- # done
261- # docker manifest create ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag} ${platform_tags} --amend
262- # docker manifest push ${DOCKER_REGISTRY}/${DOCKER_USERNAME}/${IMAGE_NAME}:${VERSION}-${tag}
263- # done
264- # fi
265-
189+ ./docker-compose.sh manifest
0 commit comments