summaryrefslogtreecommitdiffstats
path: root/.github/workflows/docker.yml
diff options
context:
space:
mode:
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 }}"}'