Fix publishing Docker images to Docker Hub. (#17397)
Austin S. Hemmelgarn committed
Apr 12, 2024 at 13:02 UTC
6dbe22e75d1ced14f00deddcd9df8244baddc3e8
1 file changed
+16
.github/workflows/docker.yml
+16
@@ -285,6 +285,22 @@ jobs:
285
cache-from: type=local,src=/tmp/build-cache
286
outputs: type=image,name=netdata/netdata,push-by-digest=true,name-canonical=true,push=true
287
build-args: OFFICIAL_IMAGE=${{ env.OFFICIAL_IMAGE }}
288
+ - name: Export Digest
289
+ id: export-digest
290
+ if: github.repository == 'netdata/netdata'
291
+ run: |
292
+ mkdir -p /tmp/digests
293
+ digest="${{ steps.build.outputs.digest }}"
294
+ touch "/tmp/digests/${digest#sha256:}"
295
+ - name: Upload digest
296
+ id: upload-digest
297
+ if: github.repository == 'netdata/netdata'
298
+ uses: actions/upload-artifact@v4
299
+ with:
300
+ name: docker-digests-${{ steps.artifact-name.outputs.platform }}
301
+ path: /tmp/digests/*
302
+ if-no-files-found: error
303
+ retention-days: 1
304
- name: Failure Notification
305
uses: rtCamp/action-slack-notify@v2
306
env: