Skip to content

Commit

Permalink
fix: GitHub workflows (#14)
Browse files Browse the repository at this point in the history
* fix strings in workflows

* add missing condition on workflow

* chore: self mutation

Signed-off-by: github-actions <[email protected]>

* test to change condition for workflow

* test to remove repository condition

* add exempt contributor

---------

Signed-off-by: github-actions <[email protected]>
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
krokoko and github-actions authored Oct 5, 2023
1 parent 1edfd27 commit 9f422fe
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-approve.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/github-merit-badger.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/monthly-repo-metrics.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .github/workflows/update-contributors.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions projenrc/github-workflows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function buildMeritBadgerWorkflow(project: AwsCdkConstructLibrary) {
'github-token': '${{ secrets.PROJEN_GITHUB_TOKEN }}',
'badges': '[beginning-contributor,repeat-contributor,valued-contributor,admired-contributor,star-contributor,distinguished-contributor]',
'thresholds': '[0,3,6,13,25,50]',
'ignore-usernames': '[emerging-tech-cdk-constructs-bot, dependabot[bot], amazon-auto, github-actions]',
'ignore-usernames': '[emerging-tech-cdk-constructs-bot, dependabot[bot], dependabot, amazon-auto, github-actions]',
},
},
],
Expand Down Expand Up @@ -66,7 +66,7 @@ export function buildMonthlyIssuesMetricsWorkflow(project: AwsCdkConstructLibrar
issues: JobPermission.WRITE,
pullRequests: JobPermission.READ,
},
if: 'github.repository == aws-samples/emerging-tech-cdk-constructs',
if: "github.repository == 'aws-samples/emerging-tech-cdk-constructs'",
runsOn: ['ubuntu-latest'],
name: 'metrics',
steps: [
Expand Down Expand Up @@ -152,7 +152,7 @@ export function buildUpdateContributorsWorkflow(project: AwsCdkConstructLibrary)
permissions: {
pullRequests: JobPermission.WRITE,
},
if: 'github.repository == aws-samples/emerging-tech-cdk-constructs',
if: "github.repository == 'aws-samples/emerging-tech-cdk-constructs'",
runsOn: ['ubuntu-latest'],
steps: [
{
Expand All @@ -165,7 +165,7 @@ export function buildUpdateContributorsWorkflow(project: AwsCdkConstructLibrary)
{
CONTRIB_REPOSITORY: 'aws-samples/emerging-tech-cdk-constructs',
CONTRIB_OUTPUT_FILE: 'CONTRIBUTORS.md',
CONTRIB_IGNORE: 'emerging-tech-cdk-constructs-bot, dependabot[bot], amazon-auto, github-actions',
CONTRIB_IGNORE: 'emerging-tech-cdk-constructs-bot, dependabot[bot], dependabot, amazon-auto, github-actions',
},
},
{
Expand Down Expand Up @@ -206,7 +206,7 @@ export function buildUpdateContributorsWorkflow(project: AwsCdkConstructLibrary)
export function buildAutoApproveWorkflow(project: AwsCdkConstructLibrary) {
const autoapprove: Job = {
runsOn: ['ubuntu-latest'],
if: 'github.repository == aws-samples/emerging-tech-cdk-constructs && github.actor == emerging-tech-cdk-constructs-bot',
if: "(github.event.pull_request.user.login == 'emerging-tech-cdk-constructs-bot') && contains(github.event.pull_request.labels.*.name, 'auto-approve')",
permissions: {
pullRequests: JobPermission.WRITE,
},
Expand Down

0 comments on commit 9f422fe

Please sign in to comment.