Open CvH opened 2 years ago
Having this issue as well, it looks like reviewdog doesn't provide a way to pass labels in or a config file.
I've got a pretty gross workaround - but it does work, you can create a temporary config file for the action to use.
Here's an example using a reusable workflow I created:
name: Lint Actions Workflows
# ensure you set secrets to inherit
on:
workflow_call:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- 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:
- my-self-hosted-runner-1
- my-self-hosted-runner-2
EOF
- uses: reviewdog/action-actionlint@v1
with:
actionlint_flags: -ignore SC2086 -config-file .github/actionlint.yaml
fail_on_error: true
level: error
reporter: github-pr-review
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
We are using runner labels and get errors like
if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file [runner-label]
is there a possibility to pass this option to actionlint?