Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Template file not found due to use of quotes around multiple template file paths #187

Closed
jmeridth opened this issue Feb 19, 2021 · 21 comments · Fixed by #188 or #190
Closed

Template file not found due to use of quotes around multiple template file paths #187

jmeridth opened this issue Feb 19, 2021 · 21 comments · Fixed by #188 or #190

Comments

@jmeridth
Copy link
Contributor

jmeridth commented Feb 19, 2021

Run shogo82148/actions-cfn-lint@v1
  with:
    github_token: ***
    args: **/*.yaml *.json
    level: error
    tool_name: cfn-lint
    reporter: github-pr-check
    filter_mode: added
    fail_on_error: false
/usr/bin/docker run --name shogo82148actionscfnlint1614_a00229 --label 5588e4 --workdir /github/workspace --rm -e INPUT_GITHUB_TOKEN -e INPUT_ARGS -e INPUT_LEVEL -e INPUT_TOOL_NAME -e INPUT_REPORTER -e INPUT_FILTER_MODE -e INPUT_FAIL_ON_ERROR -e INPUT_REVIEWDOG_FLAGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/REDACTED_REPO_NAME/REDACTED_REPO_NAME":"/github/workspace" shogo82148/actions-cfn-lint:1.6.14  "**/*.yaml" "**/*.yml" "**/*.json"
2021-02-19 19:08:47,893 - cfnlint.decode - ERROR - Template file not found: **/*.yaml
2021-02-19 19:08:47,893 - cfnlint.decode - ERROR - Template file not found: *.json
reviewdog: failed to run 'git rev-parse --show-prefix': exit status 128

Receive error above with this github action configuration:

name: Pull Request
on:
  pull_request:

jobs:
  Lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Cloudformation template linting
        uses: shogo82148/actions-cfn-lint@v1
        with:
          github_token: ${{ secrets.REDACTED_TOKEN_KEY }}
          args: "**/*.yaml *.json"

I have .json files in the root of our repo and we have subfolders with the cloudformation yaml files. When I run the command line tool cfn-lint directly I get the same error above when I use quotes (single or double)

DOUBLE QUOTES

$ cfn-lint "**/*.yaml *.json"
2021-02-19 13:29:33,790 - cfnlint.decode - ERROR - Template file not found: **/*.yaml *.json
E0000 Template file not found: **/*.yaml *.json
**/*.yaml *.json:1:1

SINGLE QUOTES

$ cfn-lint '**/*.yaml *.json'
2021-02-19 13:29:38,405 - cfnlint.decode - ERROR - Template file not found: **/*.yaml *.json
E0000 Template file not found: **/*.yaml *.json
**/*.yaml *.json:1:1

USE --template in quotes

$ cfn-lint "--template **/*.yaml *.json"
2021-02-19 13:35:47,163 - cfnlint.decode - ERROR - Template file not found: --template **/*.yaml *.json
E0000 Template file not found: --template **/*.yaml *.json
--template **/*.yaml *.json:1:1

When I don't use quotes with the cli tool it runs as expected

I understand yaml doesn't like me leaving it like this:

args: **/*.yaml *.json

Errors with this:

Screen Shot 2021-02-19 at 1 33 07 PM

Suggestion:
Turn this into an array so that I can do

args:
  - "**/*.yaml"
  - "*.json"

or something else.

Have any ideas that I may just be missing or would you like a PR?

Thank you.

@jmeridth
Copy link
Contributor Author

If I'm doing my research correctly, it looks like arrays aren't supported. But json string arrays are. Example. But that will definitely complicate things. 🤔

@jmeridth
Copy link
Contributor Author

jmeridth commented Feb 20, 2021

Decided to go the config file route

name: Pull Request
on:
  pull_request:

jobs:
  Lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Cloudformation template linting
        uses: shogo82148/actions-cfn-lint@v1
        with:
          github_token: ${{ secrets. REDACTED_TOKEN_KEY }}
          args: --config-file .cfnlintrc

.cfnlintrc

templates:
  - "**/*.yaml"
  - "*.json"

Error I'm seeing when the workflow runs is

Run shogo82148/actions-cfn-lint@v1
  with:
    github_token: ***
    args: --config-file .cfnlintrc
    level: error
    tool_name: cfn-lint
    reporter: github-pr-check
    filter_mode: added
    fail_on_error: false
.....
2021-02-20 19:42:55,719 - cfnlint.decode - ERROR - Template file not found: None
reviewdog: failed to run 'git rev-parse --show-prefix': exit status 128

Running the CLI locally with the following works

cfn-lint --config-file .cfnlintrc

Any ideas?

Thank you.

@shogo82148
Copy link
Owner

Thank you for your repot.

Suggestion:
Turn this into an array so that I can do

args:
  - "**/*.yaml"
  - "*.json"

It works in actions.yaml.

args:
- '**/*.yaml'
- '**/*.yml'
- '**/*.json'

but unfortunately, it doesn't work in .github/workflows.
.github/workflows only accepts string values.

Decided to go the config file route

name: Pull Request
on:
  pull_request:

jobs:
  Lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Cloudformation template linting
        uses: shogo82148/actions-cfn-lint@v1
        with:
          github_token: ${{ secrets. REDACTED_TOKEN_KEY }}
          args: --config-file .cfnlintrc

This workflow will execute the following command.

cfn-lint "--config-file .cfnlintrc"

hmm... 🤔

@shogo82148
Copy link
Owner

I just published #188 as v1.6.15-beta1.
I added new parameter cfn_lint_args.

cfn_lint_args: --config-file .cfnlintrc

Can you try it please?

@jmeridth
Copy link
Contributor Author

Still not working for me

My github action:

name: Pull Request
on:
  pull_request:

jobs:
  Lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Cloudformation template linting
        uses: shogo82148/actions-cfn-lint@1a52aa373ac920e927fafe2ddf0504ad6d167662
        with:
          github_token: ${{ secrets.REDACTED_TOKEN_KEY}}
          cfn_lint_args: --config-file .cfnlintrc

My .cfnlintrc file contents:

templates:
  - "**/*.yaml"
  - "*.json"
 

Result:

Run shogo82148/actions-cfn-lint@1a52aa373ac920e927fafe2ddf0504ad6d167662
  with:
    github_token: ***
    cfn_lint_args: --config-file .cfnlintrc
    level: error
    tool_name: cfn-lint
    reporter: github-pr-check
    filter_mode: added
    fail_on_error: false
.....
2021-02-21 18:02:51,047 - cfnlint.decode - ERROR - Template file not found: **/*.json
2021-02-21 18:02:51,048 - cfnlint.decode - ERROR - Template file not found: **/*.yaml
2021-02-21 18:02:51,048 - cfnlint.decode - ERROR - Template file not found: **/*.yml
reviewdog: failed to run 'git rev-parse --show-prefix': exit status 128

I even tried cfn_lint_args: --config-file $GITHUB_WORKSPACE/.cfnlintrc in case it was a pathing issue. Same error as above

Note: I learned we can't access/pull patch or beta versions. Have to reference SHA directly, hence the shogo82148/actions-cfn-lint@1a52aa373ac920e927fafe2ddf0504ad6d167662. Learned that from here. Sharing in case you didn't know.

Thank you very much for working with me on this. Cheers.

@jmeridth
Copy link
Contributor Author

@shogo82148 I see why. You didn't include you entrypoint.sh change from here in your commit with the new version. Just need that entrypoint.sh change for it to pay attention to my cfn_lint_args 😄

@shogo82148
Copy link
Owner

oops, I fixed it and released it as v1.6.15-beta2

@jmeridth
Copy link
Contributor Author

jmeridth commented Feb 22, 2021

So it seems when I used the SHA it was still pulling 1.6.14 image. But when I use 1.6.15-beta2 I get the following error:

Current runner version: '2.277.1'
Operating System
Virtual Environment
GITHUB_TOKEN Permissions
Prepare workflow directory
Prepare all required actions
Getting action download info
Failed to resolve action download info. Error: Unable to resolve action `shogo82148/actions-cfn-lint@1.6.15-beta2`, unable to find version `1.6.15-beta2`
Retrying in 17.048 seconds
Failed to resolve action download info. Error: Unable to resolve action `shogo82148/actions-cfn-lint@1.6.15-beta2`, unable to find version `1.6.15-beta2`
Retrying in 12.646 seconds
Error: Unable to resolve action `shogo82148/actions-cfn-lint@1.6.15-beta2`, unable to find version `1.6.15-beta2`

I see you have the tag and release on your github repository and I see the docker image available on docker hub here. Github caching issue maybe?

When I changed the uses statement in my github action to this

uses: docker://shogo82148/actions-cfn-lint:1.6.15-beta2

it finally pulled from docker hub. but I got an error about reviewdog input.

Run docker://shogo82148/actions-cfn-lint:1.6.15-beta2
  with:
    github_token: ***
    cfn_lint_args: --config-file .cfnlintrc
...
2021-02-22 02:55:01,812 - cfnlint.decode - ERROR - Template file not found: None
invalid boolean value "" for -fail-on-error: parse error
Usage:	reviewdog [flags]

I did notice the with block previously used the defaults like so

Run shogo82148/actions-cfn-lint@1a52aa373ac920e927fafe2ddf0504ad6d167662
  with:
    github_token: ***
    cfn_lint_args: --config-file $GITHUB_WORKSPACE/.cfnlintrc
    level: error
    tool_name: cfn-lint
    reporter: github-pr-check
    filter_mode: added
    fail_on_error: false

but this run with docker hub only had the items I used in my github action

Run docker://shogo82148/actions-cfn-lint:1.6.15-beta2
  with:
    github_token: ***
    cfn_lint_args: --config-file .cfnlintrc

Don't know what that is about yet. Looks like the defaults aren't being set. I can set them in my github action for now as a workaround. Any ideas?

Thank you again for working through this with me.

Cheers.

@jmeridth
Copy link
Contributor Author

I'm going to assume it is because if the env variables aren't set by Github Actions they can't be used in entrypoint.sh here. Hence why it thinks it received an empty string for INPUT_FAIL_ON_ERROR instead of a boolean.

I don't know default boolean in bash (maybe 1 or 0) but the notation I've used in the past is ${VARIABLE:-default} so ${INPUT_FAIL_ON_ERROR:-0} maybe?

@jmeridth
Copy link
Contributor Author

jmeridth commented Feb 22, 2021

Tried the normal (non docker hub) notation again to no avail.

 uses: shogo82148/actions-cfn-lint@1.6.15-beta2

I don't know why this isn't working

Current runner version: '2.277.1'
Operating System
Virtual Environment
GITHUB_TOKEN Permissions
Prepare workflow directory
Prepare all required actions
Getting action download info
Failed to resolve action download info. Error: Unable to resolve action `shogo82148/actions-cfn-lint@1.6.15-beta2`, unable to find version `1.6.15-beta2`
Retrying in 10.469 seconds
Failed to resolve action download info. Error: Unable to resolve action `shogo82148/actions-cfn-lint@1.6.15-beta2`, unable to find version `1.6.15-beta2`
Retrying in 12.038 seconds
Error: Unable to resolve action `shogo82148/actions-cfn-lint@1.6.15-beta2`, unable to find version `1.6.15-beta2`

@jmeridth
Copy link
Contributor Author

When I changed the uses statement in my github action to this

uses: shogo82148/actions-cfn-lint@main

It pulls the old 1.6.14 docker hub image.

Pull down action image 'shogo82148/actions-cfn-lint:1.6.14'

is that because of this?

Based on these docs I thought using @main would work. Guess not.

@jmeridth
Copy link
Contributor Author

SMH (shaking my head)

I just realized why my previous attempts were failing. I was missing the v prefix on the version. Needed to be v1.6.15-beta2 instead of 1.6.15-beta2

After updating to

 uses: shogo82148/actions-cfn-lint@v1.6.15-beta2

It is still trying to pull the 1.6.14 docker image like I mention in previous comment. I think it is because of this. I might be wrong.

@shogo82148
Copy link
Owner

please try it

uses: shogo82148/actions-cfn-lint@v1.6.15-beta3

@shogo82148 shogo82148 reopened this Feb 22, 2021
@jmeridth
Copy link
Contributor Author

Still erroring

Run shogo82148/actions-cfn-lint@v1.6.15-beta3
  with:
    github_token: ***
    cfn_lint_args: --config-file .cfnlintrc
    level: error
    tool_name: cfn-lint
    reporter: github-pr-check
    filter_mode: added
    fail_on_error: false
...
2021-02-22 07:45:42,176 - cfnlint.decode - ERROR - Template file not found: None
reviewdog: failed to run 'git rev-parse --show-prefix': exit status 128

@shogo82148
Copy link
Owner

Can I have the whole of your workflow YAML file and logs, please?

@jmeridth
Copy link
Contributor Author

jmeridth commented Feb 22, 2021

.github/workflows/pullRequest.yml

name: Pull Request
on:
  pull_request:

jobs:
  Lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Cloudformation template linting
        uses: shogo82148/actions-cfn-lint@v1.6.15-beta3
        with:
          github_token: ${{ secrets.REDACTED_TOKEN_KEY }}
          cfn_lint_args: --config-file .cfnlintrc

.cfnlintrc

templates:
  - "**/*.yaml"
  - "*.json"
  
LOGS

2021-02-22T07:45:19.9007788Z ##[section]Starting: Request a runner to run this job
2021-02-22T07:45:20.2216765Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'ubuntu-latest'
2021-02-22T07:45:20.2216860Z Can't find any online and idle self-hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest'
2021-02-22T07:45:20.2217320Z Found online and idle hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest'
2021-02-22T07:45:20.3785673Z ##[section]Finishing: Request a runner to run this job
2021-02-22T07:45:28.2244386Z Current runner version: '2.277.1'
2021-02-22T07:45:28.2280718Z ##[group]Operating System
2021-02-22T07:45:28.2281559Z Ubuntu
2021-02-22T07:45:28.2281997Z 18.04.5
2021-02-22T07:45:28.2282406Z LTS
2021-02-22T07:45:28.2409741Z ##[endgroup]
2021-02-22T07:45:28.2410236Z ##[group]Virtual Environment
2021-02-22T07:45:28.2410809Z Environment: ubuntu-18.04
2021-02-22T07:45:28.2411253Z Version: 20210211.1
2021-02-22T07:45:28.2412112Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu18/20210211.1/images/linux/Ubuntu1804-README.md
2021-02-22T07:45:28.2413102Z ##[endgroup]
2021-02-22T07:45:28.2414977Z ##[group]GITHUB_TOKEN Permissions
2021-02-22T07:45:28.2416414Z Actions: write
2021-02-22T07:45:28.2416844Z Checks: write
2021-02-22T07:45:28.2417242Z Contents: write
2021-02-22T07:45:28.2417674Z Deployments: write
2021-02-22T07:45:28.2418095Z Issues: write
2021-02-22T07:45:28.2418497Z Metadata: read
2021-02-22T07:45:28.2418994Z OrganizationPackages: write
2021-02-22T07:45:28.2419596Z Packages: write
2021-02-22T07:45:28.2420072Z PullRequests: write
2021-02-22T07:45:28.2420603Z RepositoryProjects: write
2021-02-22T07:45:28.2421131Z SecurityEvents: write
2021-02-22T07:45:28.2421582Z Statuses: write
2021-02-22T07:45:28.2422103Z ##[endgroup]
2021-02-22T07:45:28.2425005Z Prepare workflow directory
2021-02-22T07:45:28.3029865Z Prepare all required actions
2021-02-22T07:45:28.3040060Z Getting action download info
2021-02-22T07:45:28.5737620Z Download action repository 'shogo82148/actions-cfn-lint@v1.6.15-beta3'
2021-02-22T07:45:30.5161751Z ##[group]Pull down action image 'shogo82148/actions-cfn-lint:1.6.15-beta3'
2021-02-22T07:45:30.5230235Z ##[command]/usr/bin/docker pull shogo82148/actions-cfn-lint:1.6.15-beta3
2021-02-22T07:45:31.6600579Z 1.6.15-beta3: Pulling from shogo82148/actions-cfn-lint
2021-02-22T07:45:31.6602146Z ba3557a56b15: Pulling fs layer
2021-02-22T07:45:31.6602994Z 9fd869580e22: Pulling fs layer
2021-02-22T07:45:31.6603748Z 9aa8fcef4f0c: Pulling fs layer
2021-02-22T07:45:31.6604968Z 08ac389ce2af: Pulling fs layer
2021-02-22T07:45:31.6605778Z 062fdfbade4d: Pulling fs layer
2021-02-22T07:45:31.6606502Z 08ac389ce2af: Waiting
2021-02-22T07:45:31.6607320Z 062fdfbade4d: Waiting
2021-02-22T07:45:31.7517952Z 9fd869580e22: Download complete
2021-02-22T07:45:31.7969563Z ba3557a56b15: Verifying Checksum
2021-02-22T07:45:31.7982984Z ba3557a56b15: Download complete
2021-02-22T07:45:31.9154147Z 062fdfbade4d: Verifying Checksum
2021-02-22T07:45:31.9156042Z 062fdfbade4d: Download complete
2021-02-22T07:45:31.9922894Z 08ac389ce2af: Verifying Checksum
2021-02-22T07:45:31.9928018Z 08ac389ce2af: Download complete
2021-02-22T07:45:32.1084027Z ba3557a56b15: Pull complete
2021-02-22T07:45:32.1707842Z 9aa8fcef4f0c: Verifying Checksum
2021-02-22T07:45:32.1709356Z 9aa8fcef4f0c: Download complete
2021-02-22T07:45:32.2057397Z 9fd869580e22: Pull complete
2021-02-22T07:45:35.2762879Z 9aa8fcef4f0c: Pull complete
2021-02-22T07:45:35.4664127Z 08ac389ce2af: Pull complete
2021-02-22T07:45:35.5298354Z 062fdfbade4d: Pull complete
2021-02-22T07:45:35.5341642Z Digest: sha256:fc2ada972d7458b1a5d2a3dea8e1bd0aadfd2fec929465765bd8c8cc50495ef7
2021-02-22T07:45:35.5408810Z Status: Downloaded newer image for shogo82148/actions-cfn-lint:1.6.15-beta3
2021-02-22T07:45:35.5421186Z docker.io/shogo82148/actions-cfn-lint:1.6.15-beta3
2021-02-22T07:45:35.5455144Z ##[endgroup]
2021-02-22T07:45:35.5726047Z ##[group]Run shogo82148/actions-cfn-lint@v1.6.15-beta3
2021-02-22T07:45:35.5726707Z with:
2021-02-22T07:45:35.5727746Z   github_token: ***
2021-02-22T07:45:35.5728199Z   cfn_lint_args: --config-file .cfnlintrc
2021-02-22T07:45:35.5728635Z   level: error
2021-02-22T07:45:35.5728984Z   tool_name: cfn-lint
2021-02-22T07:45:35.5729422Z   reporter: github-pr-check
2021-02-22T07:45:35.5729843Z   filter_mode: added
2021-02-22T07:45:35.5730219Z   fail_on_error: false
2021-02-22T07:45:35.5730567Z ##[endgroup]
2021-02-22T07:45:35.5782442Z ##[command]/usr/bin/docker run --name shogo82148actionscfnlint1615beta3_b4deb5 --label 5588e4 --workdir /github/workspace --rm -e INPUT_GITHUB_TOKEN -e INPUT_CFN_LINT_ARGS -e INPUT_LEVEL -e INPUT_TOOL_NAME -e INPUT_REPORTER -e INPUT_FILTER_MODE -e INPUT_FAIL_ON_ERROR -e INPUT_REVIEWDOG_FLAGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/REDACTED_REPO_NAME/REDACTED_REPO_NAME":"/github/workspace" shogo82148/actions-cfn-lint:1.6.15-beta3  "**/*.yaml" "**/*.yml" "**/*.json"
2021-02-22T07:45:42.1776912Z 2021-02-22 07:45:42,176 - cfnlint.decode - ERROR - Template file not found: None
2021-02-22T07:45:42.5119590Z reviewdog: failed to run 'git rev-parse --show-prefix': exit status 128
2021-02-22T07:45:42.6432737Z Cleaning up orphan processes

@shogo82148
Copy link
Owner

That's whole?

You need to add uses: actions/checkout@v2 step before the uses: shogo82148/actions-cfn-lint@v1.6.15-beta3.
actions-cfn-lint doesn't checkout the repository.

@jmeridth
Copy link
Contributor Author

@shogo82148 that was it. /me slaps forehead. Feel kind of dumb right now. 😄

Now it runs but I'm getting

Run shogo82148/actions-cfn-lint@v1.6.15-beta3
  with:
    github_token: ***
    cfn_lint_args: --config-file .cfnlintrc
    level: error
    tool_name: cfn-lint
    reporter: github-pr-check
    filter_mode: added
    fail_on_error: false
/usr/bin/docker run --name shogo82148actionscfnlint1615beta3_b55ca0 --label 5588e4 --workdir /github/workspace --rm -e INPUT_GITHUB_TOKEN -e INPUT_CFN_LINT_ARGS -e INPUT_LEVEL -e INPUT_TOOL_NAME -e INPUT_REPORTER -e INPUT_FILTER_MODE -e INPUT_FAIL_ON_ERROR -e INPUT_REVIEWDOG_FLAGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/REDACTED_REPO_NAME/REDACTED_REPO_NAME":"/github/workspace" shogo82148/actions-cfn-lint:1.6.15-beta3  "**/*.yaml" "**/*.yml" "**/*.json"
reviewdog: Reporting results for "cfn-lint"
reviewdog: No results found for "cfn-lint". 259 results found outside diff.

Am I missing something?

name: Pull Request
on:
  pull_request:

jobs:
  Lint:
    name: Lint
    runs-on: ubuntu-latest
    steps:
      - name: Checkout source
        uses: actions/checkout@v2
      - name: Cloudformation template linting
        uses: shogo82148/actions-cfn-lint@v1.6.15-beta3
        with:
          github_token: ${{ secrets.REDACTED_KEY_NAME }}
          cfn_lint_args: --config-file .cfnlintrc

@shogo82148
Copy link
Owner

It works well.

reviewdog reports lint warnings related with the pull request.
I guess that your templates files have no changes in the pull request.
In this case, reviewdog reports nothing.

please try to add some resources into your template.

@jmeridth
Copy link
Contributor Author

Ah, gotcha. Will test. Cheers.

@jmeridth
Copy link
Contributor Author

Ok. You can close this issue. I'm still trying to figure out the sequence where I can see all the linting errors in the entire repo outside the context of the PR but not have them error (only warn). May not be able to happen with cfn-lint. Thank you so much for your help on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants