vsoch / pull-request-action

open a pull request when a branch is pushed or updated

Home Page:https://github.com/marketplace/actions/pull-request-action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example for making this work with new yaml syntax

bfelbo opened this issue · comments

Hi. This action used to work fine before Github migrated to the new yaml syntax. Do you have an example of how to get it to work?

This is what I tried (inside .github/workflows/auto-pull-request.yml):

name: Pull Request on Branch Push
on:
  push:
    branches-ignore:
      - staging
      - launchpad
      - production
jobs:
  auto-pull-request:
    name: PullRequestAction
    runs-on: ubuntu-latest
    steps:
      - name: pull-request-action
        uses: vsoch/pull-request-action@1.0.1
        with:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

However, the action fails with:

You must include the GITHUB_TOKEN as an environment variable.
##[error]Docker run failed with exit code 1

Oh vey! Yes indeed it's different and I haven't tested this yet. I can't work on this today, but I can possibly give it a look over the weekend, if that's okay with you!

And if you learn more before that, please let me know that too!

Got it working! Will post an update here in a few minutes.

hey @bfelbo ! I just updated the README with a working example, and the PR that it opened in the corresponding registry-org repository is also linked there. I'm going to close the issue, please poke again if you run into any trouble.

Sweet, thanks @vsoch!