3
name: blabla bacon n eggs on: pull_request: branches: - basickarl/gh-actions-pr defaults: run: shell: bash jobs: somting: runs-on: ubuntu-latest steps: - run: echo "testy" 

I have pushed my code on the branch stated to the origin repo in github. I have created a pull request. I updated some code on the branch and pushed, but the actions is not triggering? How does one trigger a github action workflow when updating a pull request?

The updates to the branch I am making is the workflow file itself.

Here is an example repo: https://github.com/basickarl/github-actions/actions/workflows/test.yaml

For some reason only on: [pull_request] seems to work.

2
  • If you inform the branch, the pull_request event needs to be from any branch to this specific branch (in your case, the workflow will trigger only for PR opened to the basickarl/gh-actions-pr branch). If you want the workflow to trigger every time you edit the PR, you can add the type edited as well as the branch name. More information can be found on the documentation here: docs.github.com/en/actions/learn-github-actions/… Commented Oct 14, 2021 at 17:33
  • Moreover, if you want the workflow to trigger for each push commit to your specific branch, you need to add the push event to the workflow on condition as well, the same way you did for the pull request. Commented Oct 14, 2021 at 17:34

1 Answer 1

1

Use types: [synchronize] under on: pull-request:

Sign up to request clarification or add additional context in comments.

1 Comment

You can format the code by using a code block here. You can also explain why it cna resolve the author issue

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.