From 5cb8db781735e2c2443ffbcee315e70f0cd5b866 Mon Sep 17 00:00:00 2001 From: binhex Date: Fri, 29 Jan 2021 14:11:03 +0000 Subject: [PATCH] add in comments for knarly substring line --- .github/workflows/docker.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3f1eaf9..c4022c2 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -38,7 +38,11 @@ jobs: - name: Identify GitHub tag name shell: bash - run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})" + # get tag name from runners environment 'GITHUB_REF' and then use bash substring + # to strip out '+' symbol - required due to gcr not supporting this as a tag + # name (docker hub does support it). + # note if push is NOT triggered by tag then 'GITHUB_REF' will be the branch name. + run: echo "##[set-output name=tag;]$(tag_name=${GITHUB_REF#refs/tags/} && echo "${tag_name//+/-}")" id: identify_tag - name: Build and Push to GCR and Docker Hub