Skip to content

Commit cdca68e

Browse files
committed
Only create PR when anything was pushed
1 parent 6c0643c commit cdca68e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ runs:
5050
echo "COMMIT_MESSAGE=chore(${{inputs.environment}}): promote to ${{inputs.environment}} ${{github.sha}}" >> "$GITHUB_ENV"
5151
5252
- uses: EndBug/add-and-commit@v9
53+
id: commit
5354
with:
5455
cwd: ${{env.DEST_DIR}}
5556
default_author: github_actions
@@ -58,7 +59,7 @@ runs:
5859
push: --set-upstream origin ${{env.BRANCH}} ${{env.FORCE}}
5960

6061
- uses: thomaseizinger/create-pull-request@1.4.0
61-
if: inputs.pr == 'true'
62+
if: ${{ inputs.pr == 'true' && steps.commit.outputs.pushed == 'true' }}
6263
with:
6364
github_token: ${{inputs.token}}
6465
head: ${{env.BRANCH}}

0 commit comments

Comments
 (0)