fix: Change release workflow to create a PR, rather than commit directly to branch (#3143)

* fix: Change release workflow to create a PR, rather than commit directly to branch

* Slight wording tweak

Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>

---------

Co-authored-by: Kuchenpirat <24235032+Kuchenpirat@users.noreply.github.com>
This commit is contained in:
boc-the-git 2024-02-11 09:18:18 +11:00 committed by GitHub
parent e7ee189fbb
commit a43fd6b7fc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,6 +51,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout 🛎
uses: actions/checkout@v4
@ -60,11 +61,12 @@ jobs:
sed -i 's/:v[0-9]*.[0-9]*.[0-9]*/:${{ github.event.release.tag_name }}/' docs/docs/documentation/getting-started/installation/sqlite.md
sed -i 's/:v[0-9]*.[0-9]*.[0-9]*/:${{ github.event.release.tag_name }}/' docs/docs/documentation/getting-started/installation/postgres.md
- name: Commit updates
uses: test-room-7/action-update-file@v1
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
file-path: |
docs/docs/documentation/getting-started/installation/sqlite.md
docs/docs/documentation/getting-started/installation/postgres.md
commit-msg: "Change image tag, for release ${{ github.event.release.tag_name }}"
github-token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update image tag, for release ${{ github.event.release.tag_name }}"
branch: "docs/newrelease-update-version-${{ github.event.release.tag_name }}"
delete-branch: true
base: mealie-next
title: "docs(auto): Update image tag, for release ${{ github.event.release.tag_name }}"
body: "Auto-generated by `.github/workflows/release.yml`, on publish of release ${{ github.event.release.tag_name }}"