From 15aff0e27ed10861b477de9a4c9fbc7536602f6f Mon Sep 17 00:00:00 2001 From: Gene Wood Date: Wed, 1 Feb 2023 09:01:54 -0800 Subject: [PATCH] Switching from checkout to download-file-action for .vale.ini 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 --- .github/workflows/lint.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d1c585a9e3..cd0c989cd8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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}}