Skip to content

Commit 83d7989

Browse files
committed
Refactor CI/CD workflow: remove push and pull request triggers, simplify conditions for validation jobs
1 parent 9925e88 commit 83d7989

File tree

1 file changed

+1
-26
lines changed

1 file changed

+1
-26
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: CI/CD Pipeline
22

33
on:
4-
push:
5-
branches: [ main, develop ]
6-
pull_request:
7-
branches: [ main ]
84
workflow_dispatch:
95
inputs:
106
tutorial_url:
@@ -20,7 +16,6 @@ on:
2016

2117
jobs:
2218
build-and-test:
23-
if: github.event_name != 'pull_request' || contains('OWNER,MEMBER,COLLABORATOR', github.event.pull_request.author_association)
2419
runs-on: ubuntu-latest
2520
steps:
2621
- name: Checkout code
@@ -44,7 +39,6 @@ jobs:
4439
needs: build-and-test
4540
runs-on: ubuntu-latest
4641
environment: protected-validation
47-
if: github.ref == 'refs/heads/main' || (github.event_name == 'workflow_dispatch' && contains(',skoc,', format(',{0},', github.actor)))
4842

4943
steps:
5044
- name: Checkout code
@@ -82,23 +76,4 @@ jobs:
8276
with:
8377
name: validation-results
8478
path: output/
85-
86-
- name: Comment PR with results
87-
if: github.event_name == 'pull_request'
88-
uses: actions/github-script@v7
89-
with:
90-
script: |
91-
const fs = require('fs');
92-
const path = './output/summary.json';
93-
94-
if (fs.existsSync(path)) {
95-
const summary = JSON.parse(fs.readFileSync(path, 'utf8'));
96-
const status = summary.OverallStatus === 'Passed' ? '✅' : '❌';
97-
98-
github.rest.issues.createComment({
99-
issue_number: context.issue.number,
100-
owner: context.repo.owner,
101-
repo: context.repo.repo,
102-
body: `## Tutorial Validation Results ${status}\n\n**Tutorial:** ${summary.TutorialName}\n**Status:** ${summary.OverallStatus}\n**Duration:** ${summary.Duration}\n\nSee artifacts for detailed results.`
103-
});
104-
}
79+

0 commit comments

Comments
 (0)