Skip to content

Fix GitHub Actions workflow config #38

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

Merged
merged 2 commits into from
Oct 9, 2022

Conversation

raxod502
Copy link
Contributor

Fixes #33.

We set CI to run on commits that are merged to main, and also on all commits on open pull requests. There is no need to specifically configure CI to run on merge commits, that is actually the default behavior of actions/checkout@v3 (see docs). And if we specify no trigger types for pull_request, then it will trigger on every commit to a pull request head branch (but not on commits to non-main branches that have no pull request), see docs.

@raxod502
Copy link
Contributor Author

CI on this pull request doesn't look right, because it's still using the workflow configuration from main. However, after this PR is merged, other PRs should be processed correctly.

@kddnewton kddnewton merged commit 269b788 into ruby-syntax-tree:main Oct 9, 2022
@kddnewton
Copy link
Member

@raxod502 ahh yeah I'm remembering the reason now why I used pull_request_target in the first place: pull_request doesn't have the necessary permissions to merge stuff. See: https://github.com/ruby-syntax-tree/syntax_tree-haml/actions/runs/3223216974/jobs/5273061203. I'll try to find another solution here.

@raxod502 raxod502 deleted the rr-fix-github-actions branch October 15, 2022 00:38
@raxod502
Copy link
Contributor Author

raxod502 commented Oct 15, 2022

Oof, that sucks. I guess you could use pull_request_target and then just have an explicit step to checkout the PR branch in the workflow step?

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 this pull request may close these issues.

Dependabot merges PRs that do not pass CI
2 participants