mirror of
https://github.com/netdata/netdata.git
synced 2025-04-24 13:14:11 +00:00
Publish Docker images to GHCR.io and Quay.io (#14372)
* 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:
parent
cdc223a2ff
commit
3dec478c80
2 changed files with 40 additions and 5 deletions
37
.github/workflows/docker.yml
vendored
37
.github/workflows/docker.yml
vendored
|
@ -169,12 +169,28 @@ jobs:
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Docker Hub Login
|
- name: Docker Hub Login
|
||||||
id: login
|
id: docker-hub-login
|
||||||
if: github.repository == 'netdata/netdata'
|
if: github.repository == 'netdata/netdata'
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
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
|
- name: Docker Build
|
||||||
id: build
|
id: build
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
|
@ -199,7 +215,9 @@ jobs:
|
||||||
Setup environment: ${{ steps.env.outcome }}
|
Setup environment: ${{ steps.env.outcome }}
|
||||||
Setup QEMU: ${{ steps.qemu.outcome }}
|
Setup QEMU: ${{ steps.qemu.outcome }}
|
||||||
Setup buildx: ${{ steps.buildx.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 }}
|
Build and publish images: ${{ steps.build.outcome }}
|
||||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
|
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||||
if: >-
|
if: >-
|
||||||
|
@ -254,12 +272,20 @@ jobs:
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
- name: Docker Hub Login
|
- name: Docker Hub Login
|
||||||
id: login
|
id: docker-hub-login
|
||||||
if: github.repository == 'netdata/netdata'
|
if: github.repository == 'netdata/netdata'
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
username: ${{ secrets.DOCKER_HUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
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
|
- name: Docker Build
|
||||||
id: build
|
id: build
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
|
@ -280,13 +306,14 @@ jobs:
|
||||||
SLACK_USERNAME: 'GitHub Actions'
|
SLACK_USERNAME: 'GitHub Actions'
|
||||||
SLACK_MESSAGE: |-
|
SLACK_MESSAGE: |-
|
||||||
${{ github.repository }}: Failed to build or publish Docker debug images.
|
${{ 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 release tags: ${{ steps.release-tags.outcome }}
|
||||||
Generate nightly tags: ${{ steps.nightly-tags.outcome }}
|
Generate nightly tags: ${{ steps.nightly-tags.outcome }}
|
||||||
Setup environment: ${{ steps.env.outcome }}
|
Setup environment: ${{ steps.env.outcome }}
|
||||||
Setup QEMU: ${{ steps.qemu.outcome }}
|
Setup QEMU: ${{ steps.qemu.outcome }}
|
||||||
Setup buildx: ${{ steps.buildx.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 }}
|
Build and publish images: ${{ steps.build.outcome }}
|
||||||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
|
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||||
if: >-
|
if: >-
|
||||||
|
|
|
@ -119,3 +119,11 @@ ENTRYPOINT ["/usr/sbin/run.sh"]
|
||||||
HEALTHCHECK --interval=60s --timeout=10s --retries=3 CMD /usr/sbin/health.sh
|
HEALTHCHECK --interval=60s --timeout=10s --retries=3 CMD /usr/sbin/health.sh
|
||||||
|
|
||||||
ONBUILD ENV NETDATA_OFFICIAL_IMAGE=false
|
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."
|
||||||
|
|
Loading…
Add table
Reference in a new issue