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

README is confusing about running on PRs #80

Open
andreabedini opened this issue Aug 9, 2023 · 1 comment
Open

README is confusing about running on PRs #80

andreabedini opened this issue Aug 9, 2023 · 1 comment

Comments

@andreabedini
Copy link

The README is confusing (or perhaps confused) about running the action on PRs.

## Example that doesn't run on PRs

If you were to run this action as a part of your CI workflow, you may want to prevent it from running against Pull Requests.

```yaml
name: update-flake-lock
on:
  workflow_dispatch: # allows manual triggering
  pull_request: # triggers on every Pull Request
  schedule:
    - cron: '0 0 * * 0' # runs weekly on Sunday at 00:00
...

AFAIU the comment is correct and that specification will trigger on every pull-request; while the section is about not triggering on pull-requests. I might not understand what the auther intended to say but the other examples don't have the on: pull_request: and will not trigger on PRs; so maybe this section is redundant.

@MattSturgeon
Copy link

The section isn't redundant, it just doesn't explain the use-case very clearly.

The idea is that the action might included in a normal CI workflow that is run on pushes & PRs, (instead of just schedule).

If the workflow is run on PRs, you probably want to skip the update step.

The example doesn't include a fleshed out workflow (complete with other jobs/steps), so it looks a bit silly at first glance.

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

No branches or pull requests

2 participants