mirror of
https://github.com/DeterminateSystems/update-flake-lock.git
synced 2025-04-20 17:00:16 +03:00
Don't create PR if running against a PR
Creating a PR against a PR would just lead to a PR per long-lived PR (e.g. continuous improvements make merging some feature PR not possible, yet).
This commit is contained in:
parent
b044cabb79
commit
6f3a189049
1 changed files with 7 additions and 2 deletions
|
@ -28,7 +28,9 @@ outputs:
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- run: $GITHUB_ACTION_PATH/update-flake-lock.sh
|
- name: Run flake.lock update script
|
||||||
|
run: $GITHUB_ACTION_PATH/update-flake-lock.sh
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GIT_AUTHOR_NAME: github-actions[bot]
|
GIT_AUTHOR_NAME: github-actions[bot]
|
||||||
|
@ -37,7 +39,9 @@ runs:
|
||||||
GIT_COMMITTER_EMAIL: <github-actions[bot]@users.noreply.github.com>
|
GIT_COMMITTER_EMAIL: <github-actions[bot]@users.noreply.github.com>
|
||||||
TARGETS: ${{ inputs.inputs }}
|
TARGETS: ${{ inputs.inputs }}
|
||||||
COMMIT_MSG: ${{ inputs.commit-msg }}
|
COMMIT_MSG: ${{ inputs.commit-msg }}
|
||||||
- run: |
|
- name: Get commit message
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
|
run: |
|
||||||
content="$(git log --format=%b -n 1)"
|
content="$(git log --format=%b -n 1)"
|
||||||
content="${content//'%'/'%25'}"
|
content="${content//'%'/'%25'}"
|
||||||
content="${content//$'\n'/'%0A'}"
|
content="${content//$'\n'/'%0A'}"
|
||||||
|
@ -46,6 +50,7 @@ runs:
|
||||||
shell: bash
|
shell: bash
|
||||||
id: commit_message
|
id: commit_message
|
||||||
- name: Create PR
|
- name: Create PR
|
||||||
|
if: ${{ github.event_name != 'pull_request' }}
|
||||||
id: create-pr
|
id: create-pr
|
||||||
uses: peter-evans/create-pull-request@v3
|
uses: peter-evans/create-pull-request@v3
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Reference in a new issue