Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
VaniHaripriya committed Sep 10, 2024
1 parent a936d98 commit b069db5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/ci-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ jobs:
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
steps:
- name: Print Full Event Payload
id: print-event
run: |
echo "Full event payload:"
cat $GITHUB_EVENT_PATH
- name: Set PR_NUMBER
id: set-vars
Expand All @@ -40,15 +45,16 @@ jobs:
- name: Check Status of All Workflows
run: |
pr_number=${{ env.PR_NUMBER }}
echo "Checking statuses for PR #$pr_number"
echo "Checking statuses for PR #$pr_number"
echo "Repository: $GITHUB_REPOSITORY"
echo "Workflow: KFP Manifests"

# Print the latest workflow runs
gh run list --workflow "KFP Manifests" --json "id,head_sha,status,conclusion" | jq -r --arg pr_number "$pr_number" '.[] | select(.head_sha == $pr_number) | .status'
# Print the latest workflow runs for the PR
gh run list --workflow "KFP Manifests" --json number,headSha,status --repo $GITHUB_REPOSITORY | jq -r --arg pr_number "$pr_number" '.[] | select(.headSha == $pr_number) | .status'

# Check the status of the workflow for the given PR
statuses=$(gh run list --workflow "KFP Manifests" --json status | jq -r --arg pr_number "$pr_number" '.[] | select(.head_sha == $pr_number) | .status')
statuses=$(gh run list --workflow "KFP Manifests" --json status,headSha --repo $GITHUB_REPOSITORY | jq -r --arg pr_number "$pr_number" '.[] | select(.headSha == $pr_number) | .status')

# Print statuses
echo "Statuses: $statuses"
Expand All @@ -59,7 +65,7 @@ jobs:
exit 1
else
echo "All workflows succeeded. Adding 'ci-passed' label."
gh pr edit $pr_number --add-label "ci-passed"
gh pr edit $pr_number --add-label "ci-passed" --repo $GITHUB_REPOSITORY
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .github/workflows/kubeflow-pipelines-manifests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#test
name: KFP Manifests

on:
Expand Down

0 comments on commit b069db5

Please sign in to comment.