summaryrefslogtreecommitdiffstats
path: root/.github/workflows/docker.yml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-15 20:03:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-04-15 20:03:44 +0000
commitd53c0e959780a6a22a15d52a402f52b3264858e1 (patch)
treefb94175593c65a3dffccef33ace4e035bf468be9 /.github/workflows/docker.yml
parentAdding upstream version 1.34.0. (diff)
downloadnetdata-d53c0e959780a6a22a15d52a402f52b3264858e1.tar.xz
netdata-d53c0e959780a6a22a15d52a402f52b3264858e1.zip
Adding upstream version 1.34.1.upstream/1.34.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '.github/workflows/docker.yml')
-rw-r--r--.github/workflows/docker.yml24
1 files changed, 21 insertions, 3 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 5a45b0f98..10d7093ad 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -116,10 +116,28 @@ jobs:
&& startsWith(github.ref, 'refs/heads/master')
}}
+ normalize-tag: # Fix the release tag if needed
+ name: Normalize Release Tag
+ runs-on: ubuntu-latest
+ if: github.event_name == 'workflow_dispatch'
+ outputs:
+ tag: ${{ steps.tag.outputs.tag }}
+ steps:
+ - name: Normalize Tag
+ id: tag
+ run: |
+ if echo ${{ github.event.inputs.version }} | grep -qE '^[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+$'; then
+ echo "::set-output name=tag::v${{ github.event.inputs.version }}"
+ else
+ echo "::set-output name=tag::${{ github.event.inputs.version }}"
+ fi
+
docker-publish:
if: github.event_name == 'workflow_dispatch'
name: Docker Build and Publish
- needs: docker-test
+ needs:
+ - docker-test
+ - normalize-tag
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -131,7 +149,7 @@ jobs:
id: release-tags
if: github.event.inputs.version != 'nightly'
run: |
- echo "tags=netdata/netdata:latest,netdata/netdata:stable,$(.github/scripts/gen-docker-tags.py ${{ github.event.inputs.version }})" \
+ echo "tags=netdata/netdata:latest,netdata/netdata:stable,$(.github/scripts/gen-docker-tags.py ${{ needs.normalize-tag.outputs.tag }})" \
>> "${GITHUB_ENV}"
- name: Determine which tags to use
id: nightly-tags
@@ -195,4 +213,4 @@ jobs:
repo: netdata/helmchart
workflow: Agent Version PR
ref: refs/heads/master
- inputs: '{"agent_version": "${{ github.event.inputs.version }}"}'
+ inputs: '{"agent_version": "${{ needs.normalize-tag.outputs.tag }}"}'