summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rwxr-xr-x.github/scripts/gen-docker-tags.py13
-rw-r--r--.github/workflows/docker.yml2
2 files changed, 14 insertions, 1 deletions
diff --git a/.github/scripts/gen-docker-tags.py b/.github/scripts/gen-docker-tags.py
new file mode 100755
index 0000000000..6c62511557
--- /dev/null
+++ b/.github/scripts/gen-docker-tags.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python3
+
+import sys
+
+REPO = 'netdata/netdata'
+
+version = sys.argv[1].split('.')
+
+MAJOR = ':'.join([REPO, version[0]])
+MINOR = ':'.join([REPO, '.'.join(version[0:2])])
+PATCH = ':'.join([REPO, '.'.join(version[0:3])])
+
+print(','.join([MAJOR, MINOR, PATCH]))
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 04f91bff55..5d5e8b0a7b 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -30,7 +30,7 @@ jobs:
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
+ echo "tags=netdata/netdata:latest,netdata/netdata:stable,$(.github/scripts/gen-docker-tags.py ${{ 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: |