File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Nightly Build
22on :
33 workflow_dispatch :
44 schedule :
5- - cron : " 0 * * * *"
5+ - cron : " 0 0 * * *"
66
77jobs :
88 full-validation :
@@ -11,17 +11,23 @@ jobs:
1111 - name : Checkout code
1212 uses : actions/checkout@v4
1313
14- - name : Run tests (random success/failure)
14+ - name : Run Full Validation
1515 run : |
16- echo "Running nightly tests..."
17- if [ $((RANDOM % 2)) -eq 0 ]; then
18- echo "Tests passed!"
19- exit 0
20- else
21- echo "Tests failed!"
22- exit 1
23- fi
16+ echo "Running full validation"
17+ # Your full validation steps here
2418
25- - name : Mark workflow as successful
26- if : success()
27- run : echo "Tests passed successfully!"
19+ - name : Update Full Validation Status
20+ if : always()
21+ uses : actions/github-script@v6
22+ with :
23+ github-token : ${{secrets.GITHUB_TOKEN}}
24+ script : |
25+ github.rest.repos.createCommitStatus({
26+ owner: context.repo.owner,
27+ repo: context.repo.repo,
28+ sha: context.sha,
29+ state: '${{ job.status }}',
30+ target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}',
31+ description: 'Nightly full validation',
32+ context: 'nightly-full-validation'
33+ })
You can’t perform that action at this time.
0 commit comments