File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Download rips and Python examples from main ResInsight repository
2+
3+ on :
4+ workflow_dispatch :
5+ schedule :
6+ - cron : ' 0 6 * * *' # Daily at 6 AM
7+
8+ jobs :
9+ download-latest :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Get latest successful run
13+ id : get-run
14+ uses : actions/github-script@v7
15+ with :
16+ github-token : ${{ secrets.GITHUB_TOKEN }}
17+ script : |
18+ const { data: runs } = await github.rest.actions.listWorkflowRuns({
19+ owner: 'OPM',
20+ repo: 'ResInsight',
21+ workflow_id: 'ResInsightWithCache.yml', # or workflow filename
22+ status: 'success',
23+ per_page: 1
24+ });
25+
26+ if (runs.total_count === 0) {
27+ core.setFailed('No successful runs found');
28+ return;
29+ }
30+
31+ core.setOutput('run-id', runs[0].id);
32+ core.setOutput('run-url', runs[0].html_url);
33+
34+ - name : Download artifacts
35+ uses : actions/download-artifact@v4
36+ with :
37+ name : build-artifacts # Name of the artifact
38+ repository : target-owner/target-repo
39+ run-id : ${{ steps.get-run.outputs.run-id }}
40+ github-token : ${{ secrets.GITHUB_TOKEN }}
41+ path : ./downloaded-artifacts
42+
43+ - name : List downloaded files
44+ run : |
45+ echo "Downloaded files:"
46+ ls -la ./downloaded-artifacts/
You can’t perform that action at this time.
0 commit comments