Skip to content

Commit

Permalink
chore(ci): fix syntax for concurrency in workflows (#436)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This increases the minimum required peer dependency version of Projen to v0.85.

---------

Signed-off-by: team-tf-cdk <github-team-tf-cdk@hashicorp.com>
Co-authored-by: team-tf-cdk <github-team-tf-cdk@hashicorp.com>
  • Loading branch information
xiehan and team-tf-cdk authored Aug 12, 2024
1 parent 0854799 commit cf39584
Show file tree
Hide file tree
Showing 19 changed files with 279 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json

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

4 changes: 3 additions & 1 deletion .github/workflows/auto-approve.yml

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

4 changes: 3 additions & 1 deletion .github/workflows/automerge.yml

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

3 changes: 3 additions & 0 deletions .github/workflows/build.yml

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

1 change: 0 additions & 1 deletion .github/workflows/pull-request-lint.yml

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

7 changes: 5 additions & 2 deletions .github/workflows/release.yml

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

2 changes: 2 additions & 0 deletions .github/workflows/upgrade-main.yml

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

3 changes: 2 additions & 1 deletion .github/workflows/upgrade-node.yml

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

1 change: 1 addition & 0 deletions .npmignore

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

2 changes: 1 addition & 1 deletion .projen/deps.json

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

13 changes: 9 additions & 4 deletions .projen/tasks.json

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

7 changes: 6 additions & 1 deletion .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const project = new cdk.JsiiProject({
pullRequestTemplate: false,
jsiiVersion: "~5.3.0",
typescriptVersion: "~5.3.0", // should always be the same major/minor as JSII
peerDeps: ["projen@^0.79.3", "constructs@^10.3.0"],
peerDeps: ["projen@^0.85.0", "constructs@^10.3.0"],
deps: ["change-case", "fs-extra"],
devDeps: ["@types/fs-extra", "glob", "@types/glob"],
bundledDeps: ["change-case", "fs-extra"],
Expand Down Expand Up @@ -89,6 +89,11 @@ const project = new cdk.JsiiProject({
projenrcTs: true,
});

// @typescript-eslint v7+ requires Node.js 18.18, so we are stuck on v6
// The below lines can probably be removed once Node 18 goes EOL and we upgrade minNodeVersion to 20
project.addDevDeps("@typescript-eslint/eslint-plugin@^6");
project.addDevDeps("@typescript-eslint/parser@^6");

project.addFields({ publishConfig: { access: "public" } });

new CustomizedLicense(project, 2020);
Expand Down
49 changes: 44 additions & 5 deletions API.md

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

11 changes: 7 additions & 4 deletions package.json

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

4 changes: 3 additions & 1 deletion projenrc/upgrade-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export class UpgradeNode {
workflowDispatch: {}, // allow manual triggering
});

(workflow.concurrency as any) = "${{ github.workflow }}-${{ github.ref }}";
(workflow.concurrency as any) = {
group: "${{ github.workflow }}-${{ github.ref }}",
};

workflow.addJobs({
upgrade: {
Expand Down
6 changes: 4 additions & 2 deletions src/auto-approve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ export class AutoApprove {
},
});

(workflow.concurrency as any) =
"${{ github.workflow }}-${{ github.head_ref }}";
(workflow.concurrency as any) = {
group: "${{ github.workflow }}-${{ github.head_ref }}",
cancelInProgress: true,
};

const maintainerStatuses = `fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]')`;
workflow.addJobs({
Expand Down
6 changes: 4 additions & 2 deletions src/automerge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ export class Automerge {
},
});

(workflow.concurrency as any) =
"${{ github.workflow }}-${{ github.head_ref }}";
(workflow.concurrency as any) = {
group: "${{ github.workflow }}-${{ github.head_ref }}",
cancelInProgress: true,
};

const maintainerStatuses = `fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]')`;
workflow.addJobs({
Expand Down
Loading

0 comments on commit cf39584

Please sign in to comment.