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:
parent
af98c00724
commit
378a1d6b95
1 changed files with 9 additions and 1 deletions
10
.github/workflows/reuse.yaml
vendored
10
.github/workflows/reuse.yaml
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue