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

Usage: main.workflow #3

Closed
raineorshine opened this issue Nov 23, 2019 · 3 comments · Fixed by #4
Closed

Usage: main.workflow #3

raineorshine opened this issue Nov 23, 2019 · 3 comments · Fixed by #4

Comments

@raineorshine
Copy link
Contributor

I am still a bit confused on usage.

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/configuring-a-workflow makes no reference to main.workflow and instead seems to imply that everything goes in a .yml file in /.github/workflows/.

Can you clarify how to use this action?

@juanvillegas
Copy link

juanvillegas commented Dec 2, 2019

I was confused by that as well. My config looks like this now and it works:

- name: Run ESLint
  uses: stefanoeb/eslint-action@1.0.0
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

What I'm unsure is how to specify the "args" option in a yaml file. It triggers an error if I try to use it together with the uses keyword.

@kharann
Copy link

kharann commented Dec 2, 2019

I was confused by that as well. My config looks like this now and it works:

- name: Run ESLint
  uses: stefanoeb/eslint-action@1.0.0
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

What I'm unsure is how to specify the "args" option in a yaml file. It triggers an error if I try to use it together with the uses keyword.

You have to specify the args option with "with" first. Example:

      - name: Run ESLint action
        uses: stefanoeb/eslint-action@1.0.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          args: './src/**/*.{js,ts,tsx} --max-warnings 0' 

@raineorshine
Copy link
Contributor Author

Thanks! There was a missing brace, but once I added that it worked!

      - uses: stefanoeb/eslint-action@1.0.0
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          args: './src/**/*.{js,ts,tsx} --max-warnings 0'

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

Successfully merging a pull request may close this issue.

3 participants