mirror of
https://github.com/kubescape/kubescape.git
synced 2026-04-15 06:58:11 +00:00
Merge pull request #1075 from kubescape/revert-1073-new-wf-trigger
Revert "change wf trigger"
This commit is contained in:
35
.github/workflows/01-code-review-approved.yaml
vendored
35
.github/workflows/01-code-review-approved.yaml
vendored
@@ -1,19 +1,31 @@
|
||||
name: 01-code_review_approved
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["y-code-review-approved-gate-wf"]
|
||||
types: [completed]
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
branches:
|
||||
- 'master'
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- '**.yaml'
|
||||
- '**.md'
|
||||
- '**.sh'
|
||||
- 'website/*'
|
||||
- 'examples/*'
|
||||
- 'docs/*'
|
||||
- 'build/*'
|
||||
- '.github/*'
|
||||
|
||||
|
||||
concurrency:
|
||||
group: code-review-approved
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
binary-build:
|
||||
if: ${{ github.event.review.state == 'approved' &&
|
||||
contains( github.event.pull_request.labels.*.name, 'trigger-integration-test') &&
|
||||
github.event.pull_request.base.ref == 'master' }} ## run only if labeled as "trigger-integration-test" and base branch is master
|
||||
uses: ./.github/workflows/b-binary-build-and-e2e-tests.yaml
|
||||
with:
|
||||
COMPONENT_NAME: kubescape
|
||||
@@ -24,11 +36,13 @@ jobs:
|
||||
CLIENT: test
|
||||
secrets: inherit
|
||||
|
||||
|
||||
merge-to-master:
|
||||
needs: binary-build
|
||||
env:
|
||||
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
|
||||
if: ${{ (always() && (contains(needs.*.result, 'success') || contains(needs.*.result, 'skipped')) && !(contains(needs.*.result, 'failure')) && !(contains(needs.*.result, 'cancelled'))) }}
|
||||
if: ${{ (github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master') &&
|
||||
(always() && (contains(needs.*.result, 'success') || contains(needs.*.result, 'skipped')) && !(contains(needs.*.result, 'failure')) && !(contains(needs.*.result, 'cancelled'))) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: merge-to-master
|
||||
@@ -40,7 +54,4 @@ jobs:
|
||||
MERGE_ERROR_FAIL: "true"
|
||||
MERGE_METHOD: "merge"
|
||||
MERGE_LABELS: ""
|
||||
UPDATE_LABELS: ""
|
||||
|
||||
|
||||
|
||||
UPDATE_LABELS: ""
|
||||
@@ -210,6 +210,8 @@ jobs:
|
||||
name: kubescape-ubuntu-latest
|
||||
path: "~"
|
||||
|
||||
- run: ls -laR
|
||||
|
||||
- name: chmod +x
|
||||
run: chmod +x ${{steps.download-artifact.outputs.download-path}}/kubescape-ubuntu-latest
|
||||
|
||||
|
||||
2
.github/workflows/c-create-release.yaml
vendored
2
.github/workflows/c-create-release.yaml
vendored
@@ -29,6 +29,8 @@ jobs:
|
||||
with:
|
||||
path: .
|
||||
|
||||
- run: ls -laR
|
||||
|
||||
- name: artifacts rename
|
||||
run: |
|
||||
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
name: y-code-review-approved-gate-wf
|
||||
on:
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
branches:
|
||||
- 'master'
|
||||
- 'main'
|
||||
paths-ignore:
|
||||
- '**.yaml'
|
||||
- '**.md'
|
||||
- '**.sh'
|
||||
- 'website/*'
|
||||
- 'examples/*'
|
||||
- 'docs/*'
|
||||
- 'build/*'
|
||||
- '.github/*'
|
||||
|
||||
|
||||
jobs:
|
||||
trigger-gate:
|
||||
if: ${{ github.event.review.state == 'approved' &&
|
||||
(github.event.pull_request.base.ref == 'master' || github.event.pull_request.base.ref == 'main') }} ## triggers only if code review approved an
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: trigger workflow_run
|
||||
run: echo "trigger workflow_run -> code-review-approved-gate-wf"
|
||||
Reference in New Issue
Block a user