mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Merge pull request #209 from paperless-ngx/feature-ci-ngx-dirs
Update CI from -ng to -ngx
This commit is contained in:
		
							
								
								
									
										47
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										47
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -2,7 +2,8 @@ name: ci | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     tags: ngx-* | ||||
|     tags: | ||||
|       - ngx-* | ||||
|     branches-ignore: | ||||
|       - 'translations**' | ||||
|   pull_request: | ||||
| @@ -177,37 +178,37 @@ jobs: | ||||
|         name: Move files | ||||
|         run: | | ||||
|           mkdir dist | ||||
|           mkdir dist/paperless-ng | ||||
|           mkdir dist/paperless-ng/scripts | ||||
|           cp .dockerignore .env Dockerfile Pipfile Pipfile.lock LICENSE README.md requirements.txt dist/paperless-ng/ | ||||
|           cp paperless.conf.example dist/paperless-ng/paperless.conf | ||||
|           cp gunicorn.conf.py dist/paperless-ng/gunicorn.conf.py | ||||
|           cp docker/ dist/paperless-ng/docker -r | ||||
|           cp scripts/*.service scripts/*.sh dist/paperless-ng/scripts/ | ||||
|           cp src/ dist/paperless-ng/src -r | ||||
|           cp docs/_build/html/ dist/paperless-ng/docs -r | ||||
|           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-ng/src | ||||
|           cd dist/paperless-ngx/src | ||||
|           python3 manage.py compilemessages | ||||
|       - | ||||
|         name: Collect static files | ||||
|         run: | | ||||
|           cd dist/paperless-ng/src | ||||
|           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-ng.tar.xz paperless-ng/ | ||||
|           tar -cJf paperless-ngx.tar.xz paperless-ngx/ | ||||
|       - | ||||
|         name: Upload release artifact | ||||
|         uses: actions/upload-artifact@v2 | ||||
|         with: | ||||
|           name: release | ||||
|           path: dist/paperless-ng.tar.xz | ||||
|           path: dist/paperless-ngx.tar.xz | ||||
|  | ||||
|   publish-release: | ||||
|     runs-on: ubuntu-latest | ||||
| @@ -224,7 +225,7 @@ jobs: | ||||
|         name: Get version | ||||
|         id: get_version | ||||
|         run: | | ||||
|           echo ::set-output name=version::${GITHUB_REF#refs/tags/ng-} | ||||
|           echo ::set-output name=version::${GITHUB_REF#refs/tags/ngx-} | ||||
|       - | ||||
|         name: Create release | ||||
|         id: create_release | ||||
| @@ -232,12 +233,12 @@ jobs: | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
|         with: | ||||
|           tag_name: ng-${{ steps.get_version.outputs.version }} | ||||
|           release_name: Paperless-ng ${{ steps.get_version.outputs.version }} | ||||
|           tag_name: ngx-${{ steps.get_version.outputs.version }} | ||||
|           release_name: Paperless-ngx ${{ steps.get_version.outputs.version }} | ||||
|           draft: false | ||||
|           prerelease: false | ||||
|           body: | | ||||
|             For a complete list of changes, see the changelog at https://paperless-ng.readthedocs.io/en/latest/changelog.html. | ||||
|             For a complete list of changes, see the changelog at https://paperless-ngx.readthedocs.io/en/latest/changelog.html. | ||||
|       - | ||||
|         name: Upload release archive | ||||
|         id: upload-release-asset | ||||
| @@ -246,13 +247,13 @@ jobs: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
|         with: | ||||
|           upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | ||||
|           asset_path: ./paperless-ng.tar.xz | ||||
|           asset_name: paperless-ng-${{ steps.get_version.outputs.version }}.tar.xz | ||||
|           asset_path: ./paperless-ngx.tar.xz | ||||
|           asset_name: paperless-ngx-${{ steps.get_version.outputs.version }}.tar.xz | ||||
|           asset_content_type: application/x-xz | ||||
|  | ||||
|   # build and push image to docker hub. | ||||
|   build-docker-image: | ||||
|     if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/ng-')) | ||||
|     if: github.event_name == 'push' && (startsWith(github.ref, 'refs/heads/feature-') || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/ngx-')) | ||||
|     runs-on: ubuntu-latest | ||||
|     needs: [tests, codeformatting, codestyle] | ||||
|     steps: | ||||
| @@ -261,8 +262,8 @@ jobs: | ||||
|         id: prepare | ||||
|         run: | | ||||
|           IMAGE_NAME=ghcr.io/${{ github.repository }} | ||||
|           if [[ $GITHUB_REF == refs/tags/ng-* ]]; then | ||||
|             TAGS=${IMAGE_NAME}:${GITHUB_REF#refs/tags/ng-},${IMAGE_NAME}:latest | ||||
|           if [[ $GITHUB_REF == refs/tags/ngx-* ]]; then | ||||
|             TAGS=${IMAGE_NAME}:${GITHUB_REF#refs/tags/ngx-},${IMAGE_NAME}:latest | ||||
|             INSPECT_TAG=${IMAGE_NAME}:latest | ||||
|           elif [[ $GITHUB_REF == refs/heads/* ]]; then | ||||
|             TAGS=${IMAGE_NAME}:${GITHUB_REF#refs/heads/} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Quinn Casey
					Quinn Casey