tzkhan / pr-update-action

GitHub Action that updates a pull request with information extracted from branch name

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't fail the action if the branch name doesn't match?

benrowe-chuffed opened this issue · comments

Thanks for your GH action.

It would be nice if there was an option to not fail the step if the branch name does not match.

Use the native branches: filter so it only runs on a given branch pattern

eg:

# .github/workflows/action.yml
on:
  pull_request:
    types:
      - opened
    branches:
      - main

You can use continue-on-error to prevents a job from failing when a step fails.

- uses: tzkhan/pr-update-action@v2
  continue-on-error: true
  with:
    repo-token: "${{ secrets.GITHUB_TOKEN }}"
    head-branch-regex: 'foo-\d+'
    title-template: '[%headbranch%] '