Open pcassaretto-cmc opened 2 years ago
Can we have whole contents of your .github/workflow/*.yaml
?
I also encountered this problem. Don't know how to solve this problem.
name: "test"
on:
pull_request:
branches:
- master
paths:
- ".github/workflows/**"
jobs:
actionlint:
runs-on: ["self-hosted"]
steps:
- uses: actions/checkout@v3
- uses: reviewdog/action-actionlint@v1
with:
actionlint_flags: -ignore 'label ".+" is unknown' -ignore '".+" is potentially untrusted'
reporter: github-pr-review
The workflow @shichanson posted is a great example. I think this issue actually breaks actionlint checking the workflow itself, as no errors in the workflow are reported whatsoever if flags are specified that would only ignore a subset of the errors
@pcassaretto-cmc Don't say how I use it, there is no doubt that you are a bug. My usage scenario is that I don't want to check my runner label because I have a lot of runners. My github is deployed privately.
My workaround for this problem is to generate a config file on the fly before the check is run:
- uses: actions/checkout@v3
- name: build actionlint config for runner labels
shell: bash
run: |
cat > .github/actionlint.yaml<< EOF
self-hosted-runner:
# Labels of self-hosted runner in array of string
labels:
- aws-redacted-1233456790
- aws-redacted-1233456790
- aws-redacted-1233456790
- aws-redacted-1233456790
- aws-redacted-1233456790
- aws-redacted-1233456790
- aws-redacted-1233456790
- aws-redacted-1233456790
- aws-redacted-1233456790
- aws-redacted-1233456790
- aws-redacted-1233456790
- aws-redacted-1233456790
EOF
- uses: reviewdog/action-actionlint@v1
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHELLCHECK_OPTS="-e SC2086 -e SC2129 -e SC1091 -e SC2050 -e SC2194 -e SC2154 -e SC2157"
with:
actionlint_flags: -config-file '.github/actionlint.yaml'
fail_on_error: true
level: error
reporter: github-pr-review
filter_mode: file
With the following
actionlint seems to run without producing any findings whatsoever but reports no errors. I noticed in the logs
so it appears to try and open a file with the name of the last word in the pattern to be ignored. I have tried different approaches surrounding the flag value in different quotes to no avail?
What am I doing wrong?