Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix GitHub actions error messages #4035

Closed

Conversation

gene1wood
Copy link
Contributor

@gene1wood gene1wood commented Feb 1, 2023

Description

Update download-file-action GitHub Action to v1.1.2

Currently the lint GitHub action produces these warnings

Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2, carlosperate/download-file-action@v1.0.3, DavidAnson/markdownlint-cli2-action@v4. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

This is resolved in download-file-action at v1.1.2

https://github.com/carlosperate/download-file-action/releases/tag/v1.1.2

This commit updates the action to use this new version

Update markdownlint-cli2-action to version 5

Currently the lint GitHub action produces these warnings

Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2, carlosperate/download-file-action@v1.0.3, DavidAnson/markdownlint-cli2-action@v4. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

This is resolved for markdownlint-cli2-action by updating to v5.0.0

https://github.com/DavidAnson/markdownlint-cli2-action/releases/tag/v5.0.0

This commit updates the action to use that new version

Update GitHub actions/checkout to v3

Currently when the linter runs it produces this warning

Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

This commit updates the GitHub action to use the actions/checkout action that uses Node.js 16

Update vale-action to recommended branch

Currently when the lint action runs it produces this error

Unable to create annotations; printing Vale alerts instead.

This is caused by errata-ai/vale-action#12

To fix this, the author recommends using the reviewdog branch. This commit sets the GitHub Action to that branch.

As part of this change to the reviewdog branch

  1. There's no need to indicate where the CONFIG file is as .vale.ini is in the correct location by default

  2. This new version no longer supports the __onlyModified flag so I've removed it. This does mean that the vale check will now check the whole repo. If this is a problem then we'll want to go back to the older version and live with the Unable to create annotations; printing Vale alerts instead. error ( Unable to create annotations; printing Vale alerts instead for PRs errata-ai/vale-action#12 )

Lint fixes

This also resolves the lint error

content/custom_resource_glossary.md:258:44 MD050/strong-style Strong style should be consistent [Expected: underscore; Actual: asterisk]

which is newly revealed with these new linter versions.

Definition of Done

Issues Resolved

Related PRs

Check List

  • Spell Check
  • Local build
  • Examine the local build
  • All tests pass

Currently when the lint action runs it produces this error

Unable to create annotations; printing Vale alerts instead.

This is caused by errata-ai/vale-action#12

To fix this, the author recommends using the `reviewdog` branch. This commit sets the GitHub Action to that branch.

Signed-off-by: Gene Wood <gene_wood@cementhorizon.com>
Currently when the linter runs it produces this warning

Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

This commit updates the GitHub action to use the actions/checkout action that uses Node.js 16

Signed-off-by: Gene Wood <gene_wood@cementhorizon.com>
Currently the lint GitHub action produces these warnings

Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2, carlosperate/download-file-action@v1.0.3, DavidAnson/markdownlint-cli2-action@v4. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

This is resolved for markdownlint-cli2-action by updating to v5.0.0

https://github.com/DavidAnson/markdownlint-cli2-action/releases/tag/v5.0.0

This commit updates the action to use that new version

Signed-off-by: Gene Wood <gene_wood@cementhorizon.com>
Currently the lint GitHub action produces these warnings

Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2, carlosperate/download-file-action@v1.0.3, DavidAnson/markdownlint-cli2-action@v4. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

This is resolved in download-file-action at v1.1.2

https://github.com/carlosperate/download-file-action/releases/tag/v1.1.2

This commit updates the action to use this new version

Signed-off-by: Gene Wood <gene_wood@cementhorizon.com>
@gene1wood gene1wood requested a review from a team as a code owner February 1, 2023 15:35
@netlify
Copy link

netlify bot commented Feb 1, 2023

Deploy Preview for chef-web-docs ready!

Name Link
🔨 Latest commit 15aff0e
🔍 Latest deploy log https://app.netlify.com/sites/chef-web-docs/deploys/63da9b0f4c08070008abbf61
😎 Deploy Preview https://deploy-preview-4035--chef-web-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

In the current version of vale-action the featurs are different

1. There's no need to indicate where the CONFIG file is as .vale.ini is in the correct location by default

2. This new version no longer supports the `__onlyModified` flag so I've removed it. This does mean that the vale check will now check the whole repo. If this is a problem then we'll want to go back to the older version and live with the `Unable to create annotations; printing Vale alerts instead.` error ( errata-ai/vale-action#12 )

Signed-off-by: Gene Wood <gene_wood@cementhorizon.com>
This resolves the lint error

```
content/custom_resource_glossary.md:258:44 MD050/strong-style Strong style should be consistent [Expected: underscore; Actual: asterisk]
```

Signed-off-by: Gene Wood <gene_wood@cementhorizon.com>
Previously the vale-action GitHub action would fetch it's `.vale.ini` file by fetching https://raw.githubusercontent.com/chef/chef-web-docs/main/.vale.ini

With the new `reviewdog` version the ini is passed via a checkout. This commit adds a checkout to the lint.

Signed-off-by: Gene Wood <gene_wood@cementhorizon.com>
@gene1wood gene1wood changed the title Fix GitHub actions error messages WIP Fix GitHub actions error messages Feb 1, 2023
@gene1wood gene1wood changed the title WIP Fix GitHub actions error messages Fix GitHub actions error messages Feb 1, 2023
Because the stylelint GitHub workflow uses download-release-action to fetch vale-chef, this conflicts with a full checkout causing the error

`rm: cannot remove '/home/runner/work/chef-web-docs/chef-web-docs/tools/vale/chef/vale-chef-0.2.4': Permission denied`

So this commit changes to a download-file-action instead of a checkout to fetch the `.vale.ini`

One downside to this (as is the case with the downloading of the `.markdownlint.yaml` file) is that the version of `.vale.ini` that's fetched is just whatever is at the HEAD of main, instead of the version in the PR that the check is running on.

Signed-off-by: Gene Wood <gene_wood@cementhorizon.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@gene1wood
Copy link
Contributor Author

I'm going to close out this PR and give up for the time being on fixing the vale issues and create a new PR that addresses the other GitHub action errors alone.

@gene1wood gene1wood closed this Feb 1, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant