Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Ground Controller Lvl 1
Message 1 of 2

Workflow doesn't run on pull request when pull request is created by another workflow action

Solved! Go to Solution.

For some reason that I can't figure out, my automerge.yml workflow doesn't run when my release.yml workflow creates a pull request from develop branch to master branch. Both the workflows and branches to be merged are in the same repository. - https://github.com/bruffridge/nasawds-2.0

 

release.yml

- name: pull-request
  uses: repo-sync/pull-request@v2
  with:
    source_branch: develop
    destination_branch: master
    pr_label: automerge
    github_token: ${{ secrets.GITHUB_TOKEN }}

automerge.yml

name: automerge

on:
  pull_request:
    types:
      - labeled
      - unlabeled
      - synchronize
      - opened
      - edited
      - ready_for_review
      - reopened
      - unlocked
  pull_request_review:
    types:
      - submitted
  status: {}

jobs:
  automerge:
    runs-on: ubuntu-latest
    steps:
      - name: automerge
        uses: "pascalgn/automerge-action@v0.6.1"
        env:
          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
          MERGE_FORKS: false

 

1 Reply
Solution
Ground Controller Lvl 1
Message 2 of 2

Re: Workflow doesn't run on pull request when pull request is created by another workflow action

Guess it can't be done: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-...

 

An action in a workflow run can't trigger a new workflow run. For example, if an action pushes code using the repository's GITHUB_TOKEN, a new workflow will not run even when the repository contains a workflow configured to run when push events occur.