Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally skip ci based on a label in the pr #1444

Merged
merged 17 commits into from
Dec 20, 2023
20 changes: 20 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,28 @@ permissions:
statuses: none

jobs:
prepare:
# Executes the get-pr-info action to determine if the PR has the skip-ci label, if the action fails we assume the
# PR does not have the label
name: Prepare
runs-on: ubuntu-latest
container:
image: rapidsai/ci-conda:latest
steps:
- name: Get PR Info
id: get-pr-info
uses: rapidsai/shared-action-workflows/get-pr-info@branch-23.08
if: ${{ startsWith(github.ref_name, 'pull-request/') }}
outputs:
has_skip_ci_label: ${{ steps.get-pr-info.outcome == 'success' && contains(fromJSON(steps.get-pr-info.outputs.pr-info).labels.*.name, 'skip-ci') || false }}

ci_pipe:
name: CI Pipeline
needs: [prepare]
uses: ./.github/workflows/ci_pipe.yml

# Only run the CI pipeline if the PR does not have the skip-ci label
if: ${{ ! fromJSON(needs.prepare.outputs.has_skip_ci_label) }}
with:
run_check: ${{ startsWith(github.ref_name, 'pull-request/') }}
container: nvcr.io/ea-nvidia-morpheus/morpheus:morpheus-ci-build-230913
Expand Down
Loading