Skip to content

Commit

Permalink
update workflow to check each condition
Browse files Browse the repository at this point in the history
Signed-off-by: rksharma95 <[email protected]>
  • Loading branch information
rksharma95 committed Sep 7, 2023
1 parent 09e829a commit f78edb8
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/ci-path-filter-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- 'pkg/KubeArmorController/**'
check-filter:
name: Create KubeArmor latest release
name: Run Path Filter
needs: check
runs-on: ubuntu-20.04
steps:
Expand Down Expand Up @@ -70,13 +70,23 @@ jobs:
echo "kubearmor-controller package is not updated"
fi
echo ${{ needs.check.outputs.controller }}
main-branch:
name: Check if it's not a main branch
needs: check
if: ${{ github.ref }} != 'refs/heads/main'
runs-on: ubuntu-20.04
steps:

- name: main branch
run: |
echo "main branch"
kubearmor:
name: Create KubeArmor latest release
name: check if kubearmor pkg got updated.
needs: check
if: (github.repository == 'rksharma95/kubearmor') && (needs.check.outputs.kubearmor == 'true' || ${{ github.ref }} == 'refs/heads/main')
if: needs.check.outputs.kubearmor == 'true'
runs-on: ubuntu-20.04
steps:

- name: deploy kubearmor
- name: update kubearmor
run: |
echo "kubearmor deployed"
echo "kubearmor pkg updated"

0 comments on commit f78edb8

Please sign in to comment.