summaryrefslogtreecommitdiffstats
path: root/.github/workflows/docker.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 11:08:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 11:08:07 +0000
commitc69cb8cc094cc916adbc516b09e944cd3d137c01 (patch)
treef2878ec41fb6d0e3613906c6722fc02b934eeb80 /.github/workflows/docker.yml
parentInitial commit. (diff)
downloadnetdata-c69cb8cc094cc916adbc516b09e944cd3d137c01.tar.xz
netdata-c69cb8cc094cc916adbc516b09e944cd3d137c01.zip
Adding upstream version 1.29.3.upstream/1.29.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows/docker.yml')
-rw-r--r--.github/workflows/docker.yml59
1 files changed, 59 insertions, 0 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
new file mode 100644
index 0000000..04f91bf
--- /dev/null
+++ b/.github/workflows/docker.yml
@@ -0,0 +1,59 @@
+---
+name: Docker
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - '.github/workflows/docker.yml'
+ - 'netdata-installer.sh'
+ - 'packaging/**'
+ pull_request:
+ paths:
+ - '.github/workflows/docker.yml'
+ - 'netdata-installer.sh'
+ - 'packaging/**'
+ workflow_dispatch:
+ inputs:
+ version:
+ name: Version Tag
+ default: nightly
+ required: true
+jobs:
+ docker-build:
+ name: Docker Build
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Determine if we should push changes and which tags to use
+ if: github.event_name == 'workflow_dispatch' && github.event.inputs.version != 'nightly'
+ run: |
+ echo "publish=true" >> $GITHUB_ENV
+ echo "tags=netdata/netdata:latest,netdata/netdata:stable,netdata/netdata:${{ github.event.inputs.version }}" >> $GITHUB_ENV
+ - name: Determine if we should push changes and which tags to use
+ if: github.event_name == 'workflow_dispatch' && github.event.inputs.version == 'nightly'
+ run: |
+ echo "publish=true" >> $GITHUB_ENV
+ echo "tags=netdata/netdata:latest,netdata/netdata:edge" >> $GITHUB_ENV
+ - name: Determine if we should push changes and which tags to use
+ if: github.event_name != 'workflow_dispatch'
+ run: |
+ echo "publish=false" >> $GITHUB_ENV
+ echo "tags=netdata/netdata:test" >> $GITHUB_ENV
+ - name: Setup QEMU
+ uses: docker/setup-qemu-action@v1
+ - name: Setup Buildx
+ uses: docker/setup-buildx-action@v1
+ - name: Docker Hub Login
+ if: github.event_name == 'workflow_dispatch'
+ uses: docker/login-action@v1
+ with:
+ username: ${{ secrets.DOCKER_HUB_USERNAME }}
+ password: ${{ secrets.DOCKER_HUB_PASSWORD }}
+ - name: Docker Build
+ uses: docker/build-push-action@v2
+ with:
+ platforms: linux/amd64,linux/i386,linux/arm/v7,linux/arm64
+ push: ${{ env.publish }}
+ tags: ${{ env.tags }}