Skip to content
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

Fail job if PR isn't created #970

Open
ACoolmanTelicent opened this issue Apr 18, 2024 · 0 comments
Open

Fail job if PR isn't created #970

ACoolmanTelicent opened this issue Apr 18, 2024 · 0 comments

Comments

@ACoolmanTelicent
Copy link

ACoolmanTelicent commented Apr 18, 2024

TL;DR

In some circumstances, the PR can fail to be created.

It would be nice if the Job failed

Note: We have many repos, and use the merging of a release candidate PR to deploy. If we don't get the PR and CI passes we are liable to not realise

Detailed design

This was my not-great™ fix

jobs:
  create-release-pr:
    runs-on: ubuntu-latest
    steps:
      - uses: google-github-actions/release-please-action@v3 # v3 as we are still on node 18 in this repo
        with:
          release-type: node
          package-name: release-please-action
          prerelease: false

+      - name: Check for Malformed Commit Messages
+        run: |
+          if echo "${{ steps.release-please.outputs.logs }}" | grep -q "commit could not be parsed"; then
+            echo "Malformed commit message found"
+            exit 1
+          fi

Additional information

No response

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

No branches or pull requests

1 participant