Skip to content

Commit

Permalink
Added new Github Action workflow to verify CI checks
Browse files Browse the repository at this point in the history
Signed-off-by: vmudadla <[email protected]>
  • Loading branch information
VaniHaripriya committed Oct 4, 2024
1 parent f4cdbeb commit 79a6893
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# This workflow runs on pull requests when they are opened, synchronized, or reopened.
# It performs the following actions:
# 1. Resets the 'ci-passed' label status when a pull request is synchronized or reopened,
# indicating that changes have been pushed and CI needs to rerun.
# 2. Polls every 5 minutes to check if all CI checks have passed.
# 3. Adds the 'ci-passed' label to the pull request if all CI checks pass successfully.

name: Check CI Completion

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
reset_ci_passed_label:
if: github.event_name == 'pull_request' && (github.event.action == 'synchronize' || github.event.action == 'reopened')
runs-on: ubuntu-latest
permissions:
checks: read
pull-requests: write
steps:
- name: Reset ci-passed label status on PR Syncronization
run: |
echo "Resetting 'ci-passed' label as new changes have been pushed."
gh pr edit ${{ github.event.pull_request.number }} --remove-label "ci-passed" --repo $GITHUB_REPOSITORY || echo "Label not present"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
check_ci_status:
runs-on: ubuntu-latest
permissions:
checks: read
pull-requests: write
steps:
- name: Check if all CI checks passed
uses: wechuli/allcheckspassed@0b68b3b7d92e595bcbdea0c860d05605720cf479
with:
delay: '5'
retries: '7'
polling_interval: '5'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add 'ci-passed' label
if: success()
run: |
gh pr edit ${{ github.event.pull_request.number }} --add-label "ci-passed" --repo $GITHUB_REPOSITORY
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/kfp-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ jobs:
- name: Run SDK Tests
run: |
./test/presubmit-tests-sdk.sh
# FORCE RUN
1 change: 1 addition & 0 deletions .github/workflows/kubeflow-pipelines-manifests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ jobs:

- name: Run tests
run: ./manifests/kustomize/hack/presubmit.sh
# FORCE RUN

0 comments on commit 79a6893

Please sign in to comment.