Skip to content

Commit ca251e8

Browse files
authored
Require safe-to-test label for CI to run (#141)
* Require safe-to-test label for CI to run Fixes: [ML-11153](https://iguazio.atlassian.net/browse/ML-11153) [ML-11154](https://iguazio.atlassian.net/browse/ML-11154) * Delete CI action on push --------- Co-authored-by: Gal Topper <Gal_Topper-BNKK@mckinsey.com>
1 parent e118ea1 commit ca251e8

File tree

2 files changed

+10
-49
lines changed

2 files changed

+10
-49
lines changed

.github/workflows/pr.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ on:
1919
workflow_dispatch:
2020

2121
jobs:
22+
fail-if-unsafe:
23+
runs-on: ubuntu-latest
24+
if: ${{ !contains( github.event.pull_request.labels.*.name, 'safe-to-test') }}
25+
steps:
26+
- name: Fail if not marked as safe to test
27+
run: |
28+
echo "CI will not run on a PR unless it has the safe-to-test label applied"
29+
exit 1
30+
2231
lint:
2332
name: Lint code
2433
runs-on: ubuntu-latest
@@ -39,6 +48,7 @@ jobs:
3948
test:
4049
name: Tests
4150
runs-on: [ self-hosted, Linux ]
51+
if: ${{ contains( github.event.pull_request.labels.*.name, 'safe-to-test') }}
4252
container:
4353
image: python:3.9.18
4454
credentials:

.github/workflows/push.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)