]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Runs the pre-commit hooks against the changelog before committing it 1650/head
authorTrenton H <holmes.trenton@gmail.com>
Mon, 26 Sep 2022 19:12:57 +0000 (12:12 -0700)
committerTrenton H <holmes.trenton@gmail.com>
Mon, 26 Sep 2022 19:12:57 +0000 (12:12 -0700)
.github/workflows/ci.yml

index ddf23e253339d239ea39fb9dc01c76a1e3ed3b11..46417d97e4c589f877abab970e2993f8891dfb83 100644 (file)
@@ -484,6 +484,18 @@ jobs:
         uses: actions/checkout@v3
         with:
           ref: main
+      -
+        name: Install pipenv
+        run: |
+          pip3 install --upgrade pip setuptools wheel pipx
+          pipx install pipenv
+      -
+        name: Set up Python
+        uses: actions/setup-python@v4
+        with:
+          python-version: 3.9
+          cache: "pipenv"
+          cache-dependency-path: 'Pipfile.lock'
       -
         name: Append Changelog to docs
         id: append-Changelog
@@ -497,9 +509,10 @@ jobs:
           CURRENT_CHANGELOG=`tail --lines +2 changelog.md`
           echo -e "$CURRENT_CHANGELOG" >> changelog-new.md
           mv changelog-new.md changelog.md
+          pipenv run pre-commit --files changelog.md
           git 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 commit -am "Changelog ${{ needs.publish-release.outputs.version }} - GHA"
           git push origin ${{ needs.publish-release.outputs.version }}-changelog
       -
         name: Create Pull Request