From ffa8cc22617e0eea5a5d8465b6a640956b59c1fa Mon Sep 17 00:00:00 2001
From: Sebastian Pipping <sebastian@pipping.org>
Date: Wed, 9 Mar 2022 04:40:44 +0100
Subject: [PATCH] docs: Skip follow-up steps if there is no pull request
 (#1083)

---
 README.md | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/README.md b/README.md
index 96feb07..0980ba6 100644
--- a/README.md
+++ b/README.md
@@ -90,6 +90,7 @@ Note that in order to read the step outputs the action step must have an id.
         id: cpr
         uses: peter-evans/create-pull-request@v3
       - name: Check outputs
+        if: ${{ steps.cpr.outputs.pull-request-number }}
         run: |
           echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
           echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
@@ -191,6 +192,7 @@ To create a project card for the pull request, pass the `pull-request-number` st
         uses: peter-evans/create-pull-request@v3
 
       - name: Create or Update Project Card
+        if: ${{ steps.cpr.outputs.pull-request-number }}
         uses: peter-evans/create-or-update-project-card@v1
         with:
           project-name: My project