Skip to content

Commit

Permalink
revert: switch from action-validator to yamllint (#20)
Browse files Browse the repository at this point in the history
Refs: dfa955c
  • Loading branch information
xiehan committed Oct 31, 2023
1 parent dfa955c commit 73eadb6
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 16 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.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/upgrade-cdktf.yml

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

8 changes: 8 additions & 0 deletions .projen/deps.json

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

11 changes: 7 additions & 4 deletions .projen/tasks.json

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

11 changes: 5 additions & 6 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ project.addPeerDeps(
);
project.addDevDeps(
"change-case",
"@action-validator/core",
"@action-validator/cli",
"node-fetch@~2" // @TODO this can be removed once we upgrade to Node 18 and use native fetch
);

Expand All @@ -97,14 +99,11 @@ new UpgradeCDKTF(project);
new UpgradeNode(project);

const validateTask = project.addTask("validate-workflows", {
exec: `find ./.github/workflows -type f -name "*.yml" -print0 | xargs -0 yamllint -d relaxed`,
exec: `find ./.github/workflows -type f -name "*.yml" -print0 | xargs -0 -n 1 npx action-validator`,
});
validateTask.description =
"Lint the YAML files generated by Projen to define GitHub Actions and Workflows using yamllint (installed in CI)";
project.buildWorkflow?.addPostBuildSteps({
name: "Lint the YAML files generated by Projen to define GitHub Actions workflows",
run: "npx projen validate-workflows",
});
"Lint the YAML files generated by Projen to define GitHub Actions and Workflows, checking them against published JSON schemas";
project.postCompileTask.spawn(validateTask);

// for local developing (e.g. linking local changes to cdktf)
project.addGitIgnore(".yalc");
Expand Down
2 changes: 2 additions & 0 deletions package.json

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

6 changes: 4 additions & 2 deletions projenrc/upgrade-cdktf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,12 @@ export class UpgradeCDKTF {
"chore!: upgrade to cdktf ${{ steps.latest_version.outputs.value }}",
body: [
"This PR initiates the upgrade of CDKTF from version `${{ steps.current_version.outputs.value }}` to version `${{ steps.latest_version.outputs.value }}`.",
"Unfortunately, not everything can be automated, and the following steps need to be completed manually:\n",
"Unfortunately, not everything can be automated, and the following steps need to be completed manually:",
" ",
"- [ ] Update `@cdktf/provider-null` to a version compatible with `cdktf@${{ steps.latest_version.outputs.value }}` [here](https://github.com/cdktf/construct-projen-template/blob/d62067602139725e957e516ef41d94c384af731a/.projenrc.ts#L84). Look up the version [here](https://github.com/cdktf/cdktf-provider-null/releases/).",
"- [ ] Run `npx projen`",
"\nPlease checkout this PR, complete the above steps, push the changes to this branch, and then mark this PR as ready for review to complete the upgrade. Thanks!",
" ",
"Please checkout this PR, complete the above steps, push the changes to this branch, and then mark this PR as ready for review to complete the upgrade. Thanks!",
].join("\n"),
labels: "automerge,auto-approve,dependencies",
token: "${{ secrets.PROJEN_GITHUB_TOKEN }}",
Expand Down
17 changes: 17 additions & 0 deletions yarn.lock

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

0 comments on commit 73eadb6

Please sign in to comment.