0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-13 09:11:50 +00:00

Publish Docker images to GHCR.io and Quay.io ()

* Also publish official images to GHCR.

This provides an alternative source for users to get our Docker images.

* Add basic static labels to our Docker images.

These provide slightly better behavior on GHCR, as well as providing
useful metadata for users.

* Also publish to Quay.io.

* Fix typo.

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>

---------

Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
This commit is contained in:
Austin S. Hemmelgarn 2023-01-31 08:18:22 -05:00 committed by GitHub
parent cdc223a2ff
commit 3dec478c80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 5 deletions
.github/workflows
packaging/docker

View file

@ -169,12 +169,28 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2
- name: Docker Hub Login
id: login
id: docker-hub-login
if: github.repository == 'netdata/netdata'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: GitHub Container Registry Login
id: ghcr-login
if: github.repository == 'netdata/netdata'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Quay.io Login
id: quay-login
if: github.repository == 'netdata/netdata'
uses: docker/login-action@v2
with:
registry: quay.io
username: ${{ secrets.NETDATABOT_QUAY_USERNAME }}
password: ${{ secrets.NETDATABOT_QUAY_TOKEN }}
- name: Docker Build
id: build
uses: docker/build-push-action@v3
@ -199,7 +215,9 @@ jobs:
Setup environment: ${{ steps.env.outcome }}
Setup QEMU: ${{ steps.qemu.outcome }}
Setup buildx: ${{ steps.buildx.outcome }}
Authenticate against DockerHub: ${{ steps.login.outcome }}
Login to DockerHub: ${{ steps.docker-hub-login.outcome }}
Login to GHCR: ${{ steps.ghcr-login.outcome }}
Login to Quay: ${{ steps.quay-login.outcome }}
Build and publish images: ${{ steps.build.outcome }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
if: >-
@ -254,12 +272,20 @@ jobs:
id: buildx
uses: docker/setup-buildx-action@v2
- name: Docker Hub Login
id: login
id: docker-hub-login
if: github.repository == 'netdata/netdata'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: GitHub Container Registry Login
id: ghcr-login
if: github.repository == 'netdata/netdata'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build
id: build
uses: docker/build-push-action@v3
@ -280,13 +306,14 @@ jobs:
SLACK_USERNAME: 'GitHub Actions'
SLACK_MESSAGE: |-
${{ github.repository }}: Failed to build or publish Docker debug images.
CHeckout: ${{ steps.checkout.outcome }}
Checkout: ${{ steps.checkout.outcome }}
Generate release tags: ${{ steps.release-tags.outcome }}
Generate nightly tags: ${{ steps.nightly-tags.outcome }}
Setup environment: ${{ steps.env.outcome }}
Setup QEMU: ${{ steps.qemu.outcome }}
Setup buildx: ${{ steps.buildx.outcome }}
Authenticate against DockerHub: ${{ steps.login.outcome }}
Login to DockerHub: ${{ steps.docker-hub-login.outcome }}
Login to GHCR: ${{ steps.ghcr-login.outcome }}
Build and publish images: ${{ steps.build.outcome }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
if: >-

View file

@ -119,3 +119,11 @@ ENTRYPOINT ["/usr/sbin/run.sh"]
HEALTHCHECK --interval=60s --timeout=10s --retries=3 CMD /usr/sbin/health.sh
ONBUILD ENV NETDATA_OFFICIAL_IMAGE=false
LABEL org.opencontainers.image.authors="Netdatabot <bot@netdata.cloud>"
LABEL org.opencontainers.image.url="https://netdata.cloud"
LABEL org.opencontainers.image.documentation="https://learn.netdata.cloud"
LABEL org.opencontainers.image.source="https://github.com/netdata/netdata"
LABEL org.opencontainers.image.title="Netdata Agent"
LABEL org.opencontainers.image.description="Official Netdata Agent Docker Image"
LABEL org.opencontainers.image.vendor="Netdata Inc."