22
required: true
23
env:
24
DISABLE_TELEMETRY: 1
25
+ NIGHTLY_COUNT: 4
26
concurrency:
27
group: docker-${{ github.ref }}-${{ github.event_name }}
28
cancel-in-progress: true
261
if: github.event_name == 'workflow_dispatch'
262
outputs:
263
tags: ${{ steps.tag.outputs.tags }}
264
+ nightly: ${{ steps.tag.outputs.nightly }}
265
+ nightly_tag: ${{ steps.tag.outputs.nightly_tag }}
266
+ docker_tags: ${{ steps.tag.outputs.docker_tags }}
267
+ quay_tags: ${{ steps.tag.outputs.quay_tags }}
268
+ ghcr_tags: ${{ steps.tag.outputs.ghcr_tags }}
269
+ docker_repo: ${{ steps.tag.outputs.docker_repo }}
270
+ quay_repo: ${{ steps.tag.outputs.quay_repo }}
271
+ ghcr_repo: ${{ steps.tag.outputs.ghcr_repo }}
272
steps:
273
- name: Checkout
274
id: checkout
277
id: tag
278
run: |
279
if [ ${{ github.event_name }} = 'workflow_dispatch' ]; then
271
- echo "tags=$(.github/scripts/gen-docker-tags.py ${{ github.event_name }} ${{ github.event.inputs.version }})" >> "${GITHUB_OUTPUT}"
280
+ .github/scripts/gen-docker-tags.py ${{ github.event_name }} ${{ github.event.inputs.version }}
281
else
273
- echo "tags=$(.github/scripts/gen-docker-tags.py ${{ github.event_name }} '')" >> "${GITHUB_OUTPUT}"
282
+ .github/scripts/gen-docker-tags.py ${{ github.event_name }} ''
283
fi
284
285
build-images-docker-hub:
412
id: manifest
413
if: github.repository == 'netdata/netdata'
414
run: docker buildx imagetools create $(.github/scripts/gen-docker-imagetool-args.py /tmp/digests '' "${{ needs.gen-tags.outputs.tags }}")
415
+ - name: Rotate Old Image Tags
416
+ id: rotate
417
+ if: github.repository == 'netdata/netdata' && needs.gen-tags.outputs.nightly == '1'
418
+ run: .github/scripts/rotate-docker-tags.sh ${{ needs.gen-tags.outputs.docker_repo }} ${{ needs.gen-tags.outputs.nightly_tag }} ${NIGHTLY_COUNT}
419
- name: Failure Notification
420
uses: rtCamp/action-slack-notify@v2
421
env:
431
Setup buildx: ${{ steps.prepare.outcome }}
432
Login to registry: ${{ steps.login.outcome }}
433
Create and push manifest: ${{ steps.manifest.outcome }}
434
+ Rotate old image tags: ${{ steps.rotate.outcome }}
435
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
436
if: >-
437
${{
571
id: manifest
572
if: github.repository == 'netdata/netdata'
573
run: docker buildx imagetools create $(.github/scripts/gen-docker-imagetool-args.py /tmp/digests 'quay.io' "${{ needs.gen-tags.outputs.tags }}")
574
+ - name: Rotate Old Image Tags
575
+ id: rotate
576
+ if: github.repository == 'netdata/netdata' && needs.gen-tags.outputs.nightly == '1'
577
+ run: .github/scripts/rotate-docker-tags.sh ${{ needs.gen-tags.outputs.quay_repo }} ${{ needs.gen-tags.outputs.nightly_tag }} ${NIGHTLY_COUNT}
578
- name: Failure Notification
579
uses: rtCamp/action-slack-notify@v2
580
env:
590
Setup buildx: ${{ steps.prepare.outcome }}
591
Login to registry: ${{ steps.login.outcome }}
592
Create and push manifest: ${{ steps.manifest.outcome }}
593
+ Rotate old image tags: ${{ steps.rotate.outcome }}
594
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
595
if: >-
596
${{
730
id: manifest
731
if: github.repository == 'netdata/netdata'
732
run: docker buildx imagetools create $(.github/scripts/gen-docker-imagetool-args.py /tmp/digests 'ghcr.io' "${{ needs.gen-tags.outputs.tags }}")
733
+ - name: Rotate Old Image Tags
734
+ id: rotate
735
+ if: github.repository == 'netdata/netdata' && needs.gen-tags.outputs.nightly == '1'
736
+ run: .github/scripts/rotate-docker-tags.sh ${{ needs.gen-tags.outputs.ghcr_repo }} ${{ needs.gen-tags.outputs.nightly_tag }} ${NIGHTLY_COUNT}
737
- name: Failure Notification
738
uses: rtCamp/action-slack-notify@v2
739
env:
749
Setup buildx: ${{ steps.prepare.outcome }}
750
Login to registry: ${{ steps.login.outcome }}
751
Create and push manifest: ${{ steps.manifest.outcome }}
752
+ Rotate old image tags: ${{ steps.rotate.outcome }}
753
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
754
if: >-
755
${{