-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
81 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,7 +76,7 @@ export function buildMonthlyIssuesMetricsWorkflow(project: AwsCdkConstructLibrar | |
'# Calculate the first day of the previous month', | ||
'first_day=$(date -d "last month" +%Y-%m-01)', | ||
'# Calculate the last day of the previous month', | ||
'last_day=$(date -d $first_day +1 month -1 day +%Y-%m-%d)', | ||
'last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)', | ||
'# Set an environment variable with the date range', | ||
'echo "$first_day..$last_day"', | ||
'echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"', | ||
|
@@ -156,7 +156,7 @@ export function buildUpdateContributorsWorkflow(project: AwsCdkConstructLibrary) | |
runsOn: ['ubuntu-latest'], | ||
steps: [ | ||
{ | ||
uses: 'actions/checkout@v4', | ||
uses: 'actions/checkout@v3', | ||
}, | ||
{ | ||
uses: 'minicli/[email protected]', | ||
|
@@ -233,4 +233,44 @@ export function buildAutoApproveWorkflow(project: AwsCdkConstructLibrary) { | |
workflow.addJobs({ 'auto-approve': autoapprove }); | ||
} | ||
} | ||
} | ||
} | ||
|
||
/** | ||
* https://github.com/oss-review-toolkit/ort-ci-github-action | ||
* Runs ORT toolkit on the repository. | ||
* @param project AwsCdkConstructLibrary | ||
*/ | ||
export function buildOrtToolkitWorkflow(project: AwsCdkConstructLibrary) { | ||
const orttoolkit: Job = { | ||
runsOn: ['ubuntu-latest'], | ||
permissions: { | ||
contents: JobPermission.WRITE, | ||
}, | ||
steps: [ | ||
{ | ||
name: 'Checkout project', | ||
uses: 'actions/checkout@v3', | ||
}, | ||
{ | ||
name: 'Run GitHub Action for ORT', | ||
uses: 'oss-review-toolkit/ort-ci-github-action@v1', | ||
}, | ||
], | ||
}; | ||
|
||
if (project.github) { | ||
const workflow = project.github.addWorkflow('ort-checker'); | ||
if (workflow) { | ||
workflow.on({ | ||
push: { | ||
branches: [ | ||
'main', | ||
], | ||
}, | ||
workflowDispatch: {}, | ||
}); | ||
workflow.addJobs({ ort: orttoolkit }); | ||
} | ||
} | ||
} | ||
|