Skip to content

Commit 9925e88

Browse files
committed
Enhance CI/CD workflow conditions for pull requests and validation
1 parent 15104b8 commit 9925e88

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ on:
2020

2121
jobs:
2222
build-and-test:
23+
if: github.event_name != 'pull_request' || contains('OWNER,MEMBER,COLLABORATOR', github.event.pull_request.author_association)
2324
runs-on: ubuntu-latest
2425
steps:
2526
- name: Checkout code
@@ -42,7 +43,8 @@ jobs:
4243
validate-tutorial:
4344
needs: build-and-test
4445
runs-on: ubuntu-latest
45-
if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main'
46+
environment: protected-validation
47+
if: github.ref == 'refs/heads/main' || (github.event_name == 'workflow_dispatch' && contains(',skoc,', format(',{0},', github.actor)))
4648

4749
steps:
4850
- name: Checkout code

0 commit comments

Comments
 (0)