1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-29 02:45:06 +00:00

Fix workflow using regex in main (#3306)

* using regex

Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>

* added condition

Signed-off-by: Naman Lakhwani <namanlakhwani@gmail.com>
This commit is contained in:
Naman Lakhwani 2022-02-25 14:18:11 +05:30 committed by GitHub
parent af98c00724
commit 378a1d6b95
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,12 +114,20 @@ jobs:
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Check branch
if: ${{inputs.tag == 'image' && steps.extract_branch.outputs.branch != 'main'}}
id: check-branch
run: |
if [[ ${{ steps.extract_branch.outputs.branch }} =~ ^release-[0-9]+\.[0-9]$ ]]; then
echo ::set-output name=match::true
fi
- name : Docker images publish
if: ${{inputs.tag == 'image' && steps.extract_branch.outputs.branch == 'main'}}
run: make ${{inputs.publish_command}}-dev
- name : Docker release-images publish
if: ${{inputs.tag == 'release' || (inputs.tag == 'image' && steps.extract_branch.outputs.branch == 'release*')}}
if: ${{inputs.tag == 'release' || (inputs.tag == 'image' && steps.check-branch.outputs.match == 'true')}}
run: make ${{inputs.publish_command}}
- name: get digest