Skip to content

Commit

Permalink
feat: use create-pull-request action
Browse files Browse the repository at this point in the history
Signed-off-by: Frost Ming <[email protected]>
  • Loading branch information
frostming committed Dec 27, 2023
1 parent 12b9bf3 commit 26df09b
Showing 1 changed file with 18 additions and 20 deletions.
38 changes: 18 additions & 20 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,27 @@ runs:
echo "changed=false" >> $GITHUB_OUTPUT
fi
- name: "Commit changes"
if: steps.detect-changes.outputs.changed == 'true' && inputs.sign-off-commit == 'true'
uses: EndBug/add-and-commit@v9
with:
commit: --signoff
message: ${{ inputs.commit-message }}
new_branch: dep/update-pdm-lock
push: origin dep/update-pdm-lock --set-upstream --force

- name: "Commit changes"
if: steps.detect-changes.outputs.changed == 'true' && inputs.sign-off-commit == 'false'
uses: EndBug/add-and-commit@v9
with:
message: ${{ inputs.commit-message }}
new_branch: dep/update-pdm-lock
push: origin dep/update-pdm-lock --set-upstream --force

- name: "Create PR"
- name: Create Pull Request
if: steps.detect-changes.outputs.changed == 'true'
run: gh pr create --title "${{ inputs.pr-title }}" --body "Update pdm.lock" --head dep/update-pdm-lock || true
shell: bash
uses: peter-evans/create-pull-request@v5
env:
GITHUB_TOKEN: ${{ inputs.token }}
with:
token: ${{ inputs.token }}
commit-message: ${{ inputs.commit-message }}
signoff: ${{ inputs.sign-off-commit }}
branch: dep/update-pdm-lock
delete-branch: true
title: ${{ inputs.pr-title }}
body: |
Update locked dependencies.
*Auto-generated by [PDM update action][1]*
[1]: https://github.com/pdm-project/update-deps-action
labels: |
automated pr
draft: false

branding:
icon: "code"
Expand Down

0 comments on commit 26df09b

Please sign in to comment.