peter-evans / link-checker

A GitHub action for link checking repository Markdown and HTML files
MIT License
49 stars 11 forks source link

Strange warning #24

Closed karlbrown-va closed 4 years ago

karlbrown-va commented 4 years ago

I get a strange warning as follows when running this as a github action:

##[warning]Unexpected input 'args', valid inputs are ['']`
Run peter-evans/link-checker@v1

Then the following under 'annotations'

 Check warning on line 1 in .github

@github-actions
github-actions
/ lint

.github#L1
Unexpected input 'args', valid inputs are ['']

File is as follows:

# Simple workflow for documentation checking
name: CI

on:
  push:
  pull_request:

jobs:
  lint:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repo
      uses: actions/checkout@v2

    - name: Link Checker
      id: lc
      uses: peter-evans/link-checker@v1
      with:
        args: -r *

    - name: Fail if there were link errors
      run: exit ${{ steps.lc.outputs.exit_code }}

Any idea what might be causing this?

peter-evans commented 4 years ago

Hi @karlbrown-va

This is likely a workflow formatting issue, but I don't see anything obviously wrong with your workflow.

Check the whitespace before args and make sure it's properly indented using spaces.

    - name: Link Checker
      id: lc
      uses: peter-evans/link-checker@v1
      with:
        args: -r *
karlbrown-va commented 4 years ago

I've checked the spacing, it looks ok to me.

The issue seems to be reproduced in your repo as well (the warning here is the same as the warning I saw in my action) https://github.com/peter-evans/link-checker/actions/runs/106355340

This doesn't seem to impact behavior, it's just a minor annoyance - but I can't figure out what is causing it. Maybe the with: args: format is no longer supported officially, and maybe it's supposed to be structured a different way?

peter-evans commented 4 years ago

@karlbrown-va I hadn't noticed that warning before! Thank you for pointing it out. I've fixed the issue and created a new release. The problem was that the definition for the args input was missing from action.yml. Fixed here: https://github.com/peter-evans/link-checker/commit/bc9495609301da345ab51ea3eeb70a2dceefa19c