commita4709b1175Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:36:13 2022 -0700 Update stale.yml [skip ci] commit3a031084f3Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:24:23 2022 -0700 Update changelog.md commit0c517e5351Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:18:49 2022 -0700 v1.8.0 version strings commit5fe435048bMerge:278cedf3a722bfd0Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu Jul 28 15:17:30 2022 -0700 Merge pull request #1240 from paperless-ngx/beta [Beta] Paperless-ngx v1.8.0 Release Candidate 1 commita722bfd099Author: Paperless-ngx Translation Bot [bot] <99855517+paperless-l10n@users.noreply.github.com> Date: Thu Jul 28 07:46:12 2022 -0700 New Crowdin updates (#1291) * New translations django.po (French) [ci skip] * New translations messages.xlf (French) [ci skip] * New translations django.po (French) [ci skip] * New translations messages.xlf (French) [ci skip] * New translations messages.xlf (Turkish) [ci skip] * New translations django.po (Turkish) [ci skip] commitf3d99a5fdbMerge:ca33477079de0989Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 11:21:42 2022 -0700 Merge pull request #1277 from paperless-ngx/fix/redo-ocr-button-on-edit Fix/feature: add redo ocr button to document edit view commit79de0989d5Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:54:05 2022 -0700 fix button icon spacing on mobile commitca334770b7Author: Paperless-ngx Translation Bot [bot] <99855517+paperless-l10n@users.noreply.github.com> Date: Tue Jul 26 09:45:21 2022 -0700 New Crowdin updates (#1242) * New translations messages.xlf (Turkish) [ci skip] * New translations messages.xlf (German) [ci skip] * New translations django.po (German) [ci skip] * New translations messages.xlf (Italian) [ci skip] * New translations messages.xlf (Italian) [ci skip] * New translations messages.xlf (Finnish) [ci skip] * New translations messages.xlf (Finnish) [ci skip] commit1071357505Merge:f32dfe02ef790ca6Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jul 26 09:44:42 2022 -0700 Merge pull request #1268 from paperless-ngx/bugfix-db-locked Bugfix: Adds configuration for database timeout, fixing database locked error commitf32dfe0278Merge:611707a34e78ca5dAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon Jul 25 12:59:31 2022 -0700 Merge pull request #1261 from paperless-ngx/fix/b1.8.0-ng-select-dropdowns Fix: dropdown selected items not visible again commit278cedf3d0Merge:b141671decc4553eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon Jul 25 09:25:52 2022 -0700 Merge pull request #1272 from paperless-ngx/fix-1263 Documentation: fix occasional code block color legibility commit45a6b5a436Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 20:15:26 2022 -0700 Add redo OCR button to document edit commit611707a3d1Merge:2d88638db4d20d9bAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 24 19:59:30 2022 -0700 Merge pull request #1276 from paperless-ngx/bugfix-webp-import Bugfix: Document import doesn't convert thumbnails to WebP commitb4d20d9b9aAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Sun Jul 24 10:22:53 2022 -0700 Fixes document import copying PNG files to .webp extensions without actual conversion commitecc4553e67Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 15:10:33 2022 -0700 fix occasional code block color legibility commitef790ca6f4Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 11:08:52 2022 -0700 Fixes the copy and paste of the log line commit2d88638da7Merge:0e2e5f3491ba0bd0Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 22 10:45:53 2022 -0700 Merge pull request #1269 from paperless-ngx/beta-deps-final Chore: Locks dependencies to the final versions for the beta commit91ba0bd0afAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 22 08:53:02 2022 -0700 Locks dependencies to the final versions for the beta commit0e2e5f3413Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 13:57:00 2022 -0700 Creates utiliy to ensure all paths in settings are normalized and absolute commit7a99dcf693Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Thu Jul 21 08:02:11 2022 -0700 Adds configuration for database timeout, documentation and troubleshotting suggestion commit4e78ca5d82Author: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 11:15:35 2022 -0700 remove merge error ng-select css commit83de38e56fMerge:f4be2e4fb1b6d50aAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed Jul 20 08:26:12 2022 -0700 Merge pull request #1247 from paperless-ngx/bugfix-pikepdf-ocrmypdf-warnings Bugfix: Adds pngquant and jbig2dec to Docker image commitf4be2e4fe7Merge:4444925d16b0f7f9Author: Quinn Casey <quinn@quinncasey.com> Date: Tue Jul 19 21:03:16 2022 -0700 Merge pull request #1259 from paperless-ngx/chore-add-ci-hadolint Chore: Add Hadolint job to CI commit16b0f7f9eeAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:18:47 2022 -0700 Removes a Dockerfile I can't find referenced anywhere commit27721aef71Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 14:01:47 2022 -0700 Fixes and updates the Hadolint action version commit329a317fdfAuthor: Trenton Holmes <holmes.trenton@gmail.com> Date: Tue Jul 19 13:54:33 2022 -0700 Configure Hadolint in a single location for both hooks and CI commitdaad634894Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Fri Jul 15 13:45:23 2022 -0700 Adds a CI job for hadolint over all the Dockerfiles, fixes the minor thing it complained about commit4444925deaMerge:4c697ab59c1ae96dAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon Jul 18 15:55:29 2022 -0700 Merge pull request #1249 from paperless-ngx/fix-generated-changelog [CI] Fix automatic changelog generation on release commit9c1ae96d33Author: Quinn Casey <quinn@quinncasey.com> Date: Mon Jul 18 09:48:03 2022 -0700 Create PR for changelog instead of direct commit commitb1b6d50af6Author: Trenton Holmes <holmes.trenton@gmail.com> Date: Mon Jul 18 09:46:31 2022 -0700 Adds a couple packages to the Docker image for ocrmypdf and pikepdf commit4c697ab50eAuthor: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 15:23:28 2022 -0700 Bump version to beta commitb141671d90Merge:48dfbbeb2ab2d912Author: Quinn Casey <quinn@quinncasey.com> Date: Sun Jul 17 13:18:57 2022 -0700 Merge pull request #1237 from tooomm/patch-1 chore: Run stale bot only on certain labels commit2ab2d9127dAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Fri Jul 15 20:19:28 2022 -0700 Use cant-reproduce for stale commit278453451eAuthor: tooomm <tooomm@users.noreply.github.com> Date: Fri Jul 15 21:18:38 2022 +0200 only run on certain labels commit48dfbbebc6Merge:8efb97efe568b300Author: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun Jul 3 07:42:20 2022 -0700 Merge pull request #1110 from paperless-ngx/update-issue-form commit8efb97ef4eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 19:06:32 2022 -0700 Update stale.yml [ci skip] commitd8cda7fc1bAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat Jul 2 17:51:39 2022 -0700 Use any-of-labels for stalebot [ci skip] commit68f0cf419bMerge:666b938526b12512Author: Felix E <felix@eckhofer.com> Date: Mon Jun 20 14:25:59 2022 +0200 Merge pull request #1148 from pReya/patch-1 fix: update scanner capability commit26b12512b1Author: Moritz Stückler <moritz.stueckler@gmail.com> Date: Mon Jun 20 12:06:54 2022 +0200 fix: update scanner capability The Brother ADS-A1700W does indeed support SFTP. I've just bought it, and set it up like this. commite568b3000eAuthor: shamoon <4887959+shamoon@users.noreply.github.com> Date: Tue Jun 7 15:28:49 2022 -0700 Add lsio to issue form commit666b938550Merge:de5eaf1c163231d3Author: Quinn Casey <quinn@quinncasey.com> Date: Thu May 19 17:23:23 2022 -0700 Merge pull request #990 from tooomm/patch-2 Docs: Fix headings and add links to PRs in changelog commit163231d307Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 23:12:40 2022 +0200 Link issues, capitalization and minor fixes commite530750fc6Author: tooomm <tooomm@users.noreply.github.com> Date: Thu May 19 22:05:43 2022 +0200 update heading levels for v1.7.0
402 lines
14 KiB
YAML
402 lines
14 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
# https://semver.org/#spec-item-2
|
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
# https://semver.org/#spec-item-9
|
|
- 'v[0-9]+.[0-9]+.[0-9]+-beta.rc[0-9]+'
|
|
branches-ignore:
|
|
- 'translations**'
|
|
pull_request:
|
|
branches-ignore:
|
|
- 'translations**'
|
|
|
|
jobs:
|
|
documentation:
|
|
name: "Build Documentation"
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v3
|
|
-
|
|
name: Install pipenv
|
|
run: 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: Install dependencies
|
|
run: |
|
|
pipenv sync --dev
|
|
-
|
|
name: Make documentation
|
|
run: |
|
|
cd docs/
|
|
pipenv run make html
|
|
-
|
|
name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: documentation
|
|
path: docs/_build/html/
|
|
|
|
ci-backend:
|
|
uses: ./.github/workflows/reusable-ci-backend.yml
|
|
|
|
ci-frontend:
|
|
uses: ./.github/workflows/reusable-ci-frontend.yml
|
|
|
|
prepare-docker-build:
|
|
name: Prepare Docker Pipeline Data
|
|
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/beta' || contains(github.ref, 'beta.rc') || startsWith(github.ref, 'refs/tags/v'))
|
|
runs-on: ubuntu-20.04
|
|
# If the push triggered the installer library workflow, wait for it to
|
|
# complete here. This ensures the required versions for the final
|
|
# image have been built, while not waiting at all if the versions haven't changed
|
|
concurrency:
|
|
group: build-installer-library
|
|
cancel-in-progress: false
|
|
needs:
|
|
- documentation
|
|
- ci-backend
|
|
- ci-frontend
|
|
steps:
|
|
-
|
|
name: Set ghcr repository name
|
|
id: set-ghcr-repository
|
|
run: |
|
|
ghcr_name=$(echo "${GITHUB_REPOSITORY}" | awk '{ print tolower($0) }')
|
|
echo ::set-output name=repository::${ghcr_name}
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v3
|
|
-
|
|
name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.9"
|
|
-
|
|
name: Setup qpdf image
|
|
id: qpdf-setup
|
|
run: |
|
|
build_json=$(python ${GITHUB_WORKSPACE}/.github/scripts/get-build-json.py qpdf)
|
|
|
|
echo ${build_json}
|
|
|
|
echo ::set-output name=qpdf-json::${build_json}
|
|
-
|
|
name: Setup psycopg2 image
|
|
id: psycopg2-setup
|
|
run: |
|
|
build_json=$(python ${GITHUB_WORKSPACE}/.github/scripts/get-build-json.py psycopg2)
|
|
|
|
echo ${build_json}
|
|
|
|
echo ::set-output name=psycopg2-json::${build_json}
|
|
-
|
|
name: Setup pikepdf image
|
|
id: pikepdf-setup
|
|
run: |
|
|
build_json=$(python ${GITHUB_WORKSPACE}/.github/scripts/get-build-json.py pikepdf)
|
|
|
|
echo ${build_json}
|
|
|
|
echo ::set-output name=pikepdf-json::${build_json}
|
|
-
|
|
name: Setup jbig2enc image
|
|
id: jbig2enc-setup
|
|
run: |
|
|
build_json=$(python ${GITHUB_WORKSPACE}/.github/scripts/get-build-json.py jbig2enc)
|
|
|
|
echo ${build_json}
|
|
|
|
echo ::set-output name=jbig2enc-json::${build_json}
|
|
|
|
outputs:
|
|
|
|
ghcr-repository: ${{ steps.set-ghcr-repository.outputs.repository }}
|
|
|
|
qpdf-json: ${{ steps.qpdf-setup.outputs.qpdf-json }}
|
|
|
|
pikepdf-json: ${{ steps.pikepdf-setup.outputs.pikepdf-json }}
|
|
|
|
psycopg2-json: ${{ steps.psycopg2-setup.outputs.psycopg2-json }}
|
|
|
|
jbig2enc-json: ${{ steps.jbig2enc-setup.outputs.jbig2enc-json}}
|
|
|
|
# build and push image to docker hub.
|
|
build-docker-image:
|
|
runs-on: ubuntu-20.04
|
|
concurrency:
|
|
group: ${{ github.workflow }}-build-docker-image-${{ github.ref_name }}
|
|
cancel-in-progress: true
|
|
needs:
|
|
- prepare-docker-build
|
|
steps:
|
|
-
|
|
name: Check pushing to Docker Hub
|
|
id: docker-hub
|
|
# Only push to Dockerhub from the main repo AND the ref is either:
|
|
# main
|
|
# dev
|
|
# beta
|
|
# a tag
|
|
# Otherwise forks would require a Docker Hub account and secrets setup
|
|
run: |
|
|
if [[ ${{ needs.prepare-docker-build.outputs.ghcr-repository }} == "paperless-ngx/paperless-ngx" && ( ${{ github.ref_name }} == "main" || ${{ github.ref_name }} == "dev" || ${{ github.ref_name }} == "beta" || ${{ startsWith(github.ref, 'refs/tags/v') }} == "true" ) ]] ; then
|
|
echo "Enabling DockerHub image push"
|
|
echo ::set-output name=enable::"true"
|
|
else
|
|
echo "Not pushing to DockerHub"
|
|
echo ::set-output name=enable::"false"
|
|
fi
|
|
-
|
|
name: Gather Docker metadata
|
|
id: docker-meta
|
|
uses: docker/metadata-action@v4
|
|
with:
|
|
images: |
|
|
ghcr.io/${{ needs.prepare-docker-build.outputs.ghcr-repository }}
|
|
name=paperlessngx/paperless-ngx,enable=${{ steps.docker-hub.outputs.enable }}
|
|
tags: |
|
|
# Tag branches with branch name
|
|
type=ref,event=branch
|
|
# Process semver tags
|
|
# For a tag x.y.z or vX.Y.Z, output an x.y.z and x.y image tag
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v3
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
-
|
|
name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
-
|
|
name: Login to Github Container Registry
|
|
uses: docker/login-action@v2
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
-
|
|
name: Login to Docker Hub
|
|
uses: docker/login-action@v2
|
|
# Don't attempt to login is not pushing to Docker Hub
|
|
if: steps.docker-hub.outputs.enable == 'true'
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
-
|
|
name: Build and push
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
platforms: linux/amd64,linux/arm/v7,linux/arm64
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.docker-meta.outputs.tags }}
|
|
labels: ${{ steps.docker-meta.outputs.labels }}
|
|
build-args: |
|
|
JBIG2ENC_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.jbig2enc-json).version }}
|
|
QPDF_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.qpdf-json).version }}
|
|
PIKEPDF_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.pikepdf-json).version }}
|
|
PSYCOPG2_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.psycopg2-json).version }}
|
|
# Get cache layers from this branch, then dev, then main
|
|
# This allows new branches to get at least some cache benefits, generally from dev
|
|
cache-from: |
|
|
type=registry,ref=ghcr.io/${{ needs.prepare-docker-build.outputs.ghcr-repository }}/builder/cache/app:${{ github.ref_name }}
|
|
type=registry,ref=ghcr.io/${{ needs.prepare-docker-build.outputs.ghcr-repository }}/builder/cache/app:dev
|
|
type=registry,ref=ghcr.io/${{ needs.prepare-docker-build.outputs.ghcr-repository }}/builder/cache/app:main
|
|
cache-to: |
|
|
type=registry,mode=max,ref=ghcr.io/${{ needs.prepare-docker-build.outputs.ghcr-repository }}/builder/cache/app:${{ github.ref_name }}
|
|
-
|
|
name: Inspect image
|
|
run: |
|
|
docker buildx imagetools inspect ${{ fromJSON(steps.docker-meta.outputs.json).tags[0] }}
|
|
-
|
|
name: Export frontend artifact from docker
|
|
run: |
|
|
docker create --name frontend-extract ${{ fromJSON(steps.docker-meta.outputs.json).tags[0] }}
|
|
docker cp frontend-extract:/usr/src/paperless/src/documents/static/frontend src/documents/static/frontend/
|
|
-
|
|
name: Upload frontend artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: frontend-compiled
|
|
path: src/documents/static/frontend/
|
|
|
|
build-release:
|
|
needs:
|
|
- build-docker-image
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v3
|
|
-
|
|
name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.9
|
|
-
|
|
name: Install dependencies
|
|
run: |
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -qq --no-install-recommends gettext liblept5
|
|
pip3 install --upgrade pip setuptools wheel
|
|
pip3 install -r requirements.txt
|
|
-
|
|
name: Download frontend artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: frontend-compiled
|
|
path: src/documents/static/frontend/
|
|
-
|
|
name: Download documentation artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: documentation
|
|
path: docs/_build/html/
|
|
-
|
|
name: Move files
|
|
run: |
|
|
mkdir dist
|
|
mkdir dist/paperless-ngx
|
|
mkdir dist/paperless-ngx/scripts
|
|
cp .dockerignore .env Dockerfile Pipfile Pipfile.lock LICENSE README.md requirements.txt dist/paperless-ngx/
|
|
cp paperless.conf.example dist/paperless-ngx/paperless.conf
|
|
cp gunicorn.conf.py dist/paperless-ngx/gunicorn.conf.py
|
|
cp docker/ dist/paperless-ngx/docker -r
|
|
cp scripts/*.service scripts/*.sh dist/paperless-ngx/scripts/
|
|
cp src/ dist/paperless-ngx/src -r
|
|
cp docs/_build/html/ dist/paperless-ngx/docs -r
|
|
-
|
|
name: Compile messages
|
|
run: |
|
|
cd dist/paperless-ngx/src
|
|
python3 manage.py compilemessages
|
|
-
|
|
name: Collect static files
|
|
run: |
|
|
cd dist/paperless-ngx/src
|
|
python3 manage.py collectstatic --no-input
|
|
-
|
|
name: Make release package
|
|
run: |
|
|
cd dist
|
|
find . -name __pycache__ | xargs rm -r
|
|
tar -cJf paperless-ngx.tar.xz paperless-ngx/
|
|
-
|
|
name: Upload release artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: release
|
|
path: dist/paperless-ngx.tar.xz
|
|
|
|
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-release
|
|
if: github.ref_type == 'tag' && (startsWith(github.ref_name, 'v') || contains(github.ref_name, '-beta.rc'))
|
|
steps:
|
|
-
|
|
name: Download release artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: release
|
|
path: ./
|
|
-
|
|
name: Get version
|
|
id: get_version
|
|
run: |
|
|
echo ::set-output name=version::${{ github.ref_name }}
|
|
if [[ ${{ contains(github.ref_name, '-beta.rc') }} == 'true' ]]; then
|
|
echo ::set-output name=prerelease::true
|
|
else
|
|
echo ::set-output name=prerelease::false
|
|
fi
|
|
-
|
|
name: Create Release and Changelog
|
|
id: create-release
|
|
uses: release-drafter/release-drafter@v5
|
|
with:
|
|
name: Paperless-ngx ${{ steps.get_version.outputs.version }}
|
|
tag: ${{ steps.get_version.outputs.version }}
|
|
version: ${{ steps.get_version.outputs.version }}
|
|
prerelease: ${{ steps.get_version.outputs.prerelease }}
|
|
publish: true # ensures release is not marked as draft
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
-
|
|
name: Upload release archive
|
|
id: upload-release-asset
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create-release.outputs.upload_url }}
|
|
asset_path: ./paperless-ngx.tar.xz
|
|
asset_name: paperless-ngx-${{ steps.get_version.outputs.version }}.tar.xz
|
|
asset_content_type: application/x-xz
|
|
|
|
append-changelog:
|
|
runs-on: ubuntu-20.04
|
|
needs:
|
|
- publish-release
|
|
if: needs.publish-release.outputs.prerelease == 'false'
|
|
steps:
|
|
-
|
|
name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: main
|
|
-
|
|
name: Append Changelog to docs
|
|
id: append-Changelog
|
|
working-directory: docs
|
|
run: |
|
|
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.md
|
|
CURRENT_CHANGELOG=`tail --lines +2 changelog.md`
|
|
echo -e "$CURRENT_CHANGELOG" >> changelog-new.md
|
|
mv changelog-new.md 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 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']
|
|
});
|