Skip to content

Commit

Permalink
Switching from checkout to download-file-action for .vale.ini
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
gene1wood committed Feb 1, 2023
1 parent 3816460 commit 15aff0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ jobs:
tag: 'v0.2.4'
path: tools/vale/chef
token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/checkout@v3
- uses: carlosperate/download-file-action@v1.1.2
id: download-vale-config
with:
file-url: 'https://raw.githubusercontent.com/chef/chef-web-docs/main/.vale.ini'
file-name: '.vale.ini'
- uses: errata-ai/vale-action@reviewdog
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand Down

0 comments on commit 15aff0e

Please # to comment.