Skip to content

Commit ddd2b69

Browse files
authored
Merge pull request #1 from abpframework/skoc/ci-action
Refactor CI/CD workflow: remove push and pull request triggers, simplify conditions for validation jobs
2 parents 15104b8 + 83d7989 commit ddd2b69

File tree

1 file changed

+2
-25
lines changed

1 file changed

+2
-25
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 25 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:
@@ -42,7 +38,7 @@ jobs:
4238
validate-tutorial:
4339
needs: build-and-test
4440
runs-on: ubuntu-latest
45-
if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main'
41+
environment: protected-validation
4642

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

0 commit comments

Comments
 (0)