micnncim / action-label-syncer

GitHub Action to sync GitHub labels in the declarative way
https://github.com/marketplace/actions/label-syncer
Apache License 2.0
197 stars 31 forks source link

Fix example workflow syntax #37

Closed hugovk closed 4 years ago

hugovk commented 4 years ago

Without it:

Check failure on line 1 in .github/workflows/labels.yml

GitHub Actions
/ .github/workflows/labels.yml

Invalid Workflow File
`build` is not a valid event name

https://github.com/hugovk/tinytext/actions/runs/40291801

hugovk commented 4 years ago

Also, about the on.push.paths value:

name: Sync labels
on:
  push:
    branches:
      - master
    paths:
      - path/to/labels.yml
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: micnncim/action-label-syncer@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          manifest: labels.yml

I understand the idea in this example is to only run when path/to/labels.yml exists.

Would it make sense for that to be the manifest file, or the workflow file? Or both?

It's a bit unclear when both have the same filename :)

micnncim commented 4 years ago

It makes sense. Thank you!

hugovk commented 4 years ago

You're welcome!

How about the question in https://github.com/micnncim/action-label-syncer/pull/37#issuecomment-586737079?

micnncim commented 4 years ago

Ah, the config requires the change of path/to/labels.yml for workflow run.

Would it make sense for that to be the manifest file, or the workflow file? Or both?

Only the manifest file. And the names of the manifest file and the workflow file should be different.

If you have more questions, feel free ask me :)

hugovk commented 4 years ago

Would it make sense for that to be the manifest file, or the workflow file? Or both?

Only the manifest file.

Thank you, I've created https://github.com/micnncim/action-label-syncer/pull/38 to help clarify this.

And the names of the manifest file and the workflow file should be different.

OK, thanks. I saw the cloudalchemy/ansible-* repos in the README use labels.yml for both :)

micnncim commented 4 years ago

OK, thanks. I saw the cloudalchemy/ansible-* repos in the README use labels.yml for both :)

Sorry, actually, the paths should be different. So just the filenames can be same.

hugovk commented 4 years ago

Got it! Thanks very much for this Action, it's been useful so far, and I'll send a PR to the README with new example repos after I use it to some more :)

micnncim commented 4 years ago

Thanks too! I'm willing to accept your PRs and ideas :+1: