A community-supported supercharged document management system: scan, index and archive all your documents
Python aiangulararchivingdjangodmsdocument-managementdocument-management-systemllmmachine-learningocroptical-character-recognitionpdf
Create PR for changelog instead of direct commit
Quinn Casey9c1ae96d336b
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlindex 3c17f72a3..d6db6e6d1 100644--- a/.github/workflows/ci.yml+++ b/.github/workflows/ci.yml@@ -305,6 +305,10 @@ jobs:publish-release:runs-on: ubuntu-20.04+ outputs:+ prerelease: ${{ steps.get_version.outputs.prerelease }}+ changelog: ${{ steps.create-release.outputs.body }}+ version: ${{ steps.get_version.outputs.version }}needs:- build-releaseif: github.ref_type == 'tag' && (startsWith(github.ref_name, 'v') || contains(github.ref_name, '-beta.rc'))@@ -348,6 +352,13 @@ jobs:asset_path: ./paperless-ngx.tar.xzasset_name: paperless-ngx-${{ steps.get_version.outputs.version }}.tar.xzasset_content_type: application/x-xz++ append-changelog:+ runs-on: ubuntu-20.04+ needs:+ - publish-release+ if: needs.publish-release.outputs.prerelease == 'false'+ steps:-name: Checkoutuses: actions/checkout@v3@@ -358,11 +369,33 @@ jobs:id: append-Changelogworking-directory: docsrun: |- echo -e "# Changelog\n\n${{ steps.create-release.outputs.body }}\n" > changelog-new.md+ git branch ${{ needs.publish-release.outputs.version }}-changelog+ git checkout ${{ needs.publish-release.outputs.version }}-changelog+ echo -e "# Changelog\n\n${{ needs.publish-release.outputs.changelog }}\n" > changelog-new.mdCURRENT_CHANGELOG=`tail --lines +2 changelog.md`echo -e "$CURRENT_CHANGELOG" >> changelog-new.mdmv changelog-new.md changelog.mdgit config --global user.name "github-actions"git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"git commit -am "Changelog ${{ steps.get_version.outputs.version }} - GHA"- git push origin HEAD:main+ git push origin ${{ needs.publish-release.outputs.version }}-changelog+ -+ name: Create Pull Request+ uses: actions/github-script@v6+ with:+ script: |+ const { repo, owner } = context.repo;+ const result = await github.rest.pulls.create({+ title: '[Documentation] Add ${{ needs.publish-release.outputs.version }} changelog',+ owner,+ repo,+ head: '${{ needs.publish-release.outputs.version }}-changelog',+ base: 'main',+ body: 'This PR is auto-generated by CI.'+ });+ github.rest.issues.addLabels({+ owner,+ repo,+ issue_number: result.data.number,+ labels: ['documentation']+ });