composite action to create dockertag from branchname using SC naming convention
runs with conditional branch tags
Shell must be a valid built-in (bash, sh, cmd, powershell, pwsh)
So for Python3 you need a container action see: https://github.com/RalfNellesCap/sc-build-push
- Integrate external versioning to action
- Integrate external RegEx actions
Regex and Condition with Bash-Shell
- name: Check Tag
id: check-tag
run: |
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo ::set-output name=match::true
fi
- name: Build
if: steps.check-tag.outputs.match == 'true'
run: |
echo "Tag is a match"
- name: Get Dockertags for branch
id: tag
uses: RalfNellesCap/composite_action_dockertag@v1.0.12
with:
AVCHECK_VERSION: ${{ env.AVCHECK_VERSION }}
GIT_SHA: ${{ env.GITHUB_SHA }}
JIRA_TicketID: ${{ env.JIRA_TicketID }}
BRANCH_PREFIX: ${{ env.BRANCH_PREFIX }}
- name: return values action
run: |
echo "Dockertag:${{ steps.tag.outputs.docker-tag }}"
echo "SHA_tag=${{ steps.tag.outputs.docker-sha }}"
- name: Set Env Vars for Dockertags
run: |
echo DOCKER_TAG_POSTFIX=${{ steps.tag.outputs.docker-tag }} >> $GITHUB_ENV
echo DOCKER_TAG_SHA=${{ steps.tag.outputs.docker-sha }} >> $GITHUB_ENV
- name: Echo DOCKER_TAG_POSTFIX