mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Adds a couple build args to force pikepdf to rebuild dependent wheels if the versions change
This commit is contained in:
		 Trenton Holmes
					Trenton Holmes
				
			
				
					committed by
					
						 Trenton H
						Trenton H
					
				
			
			
				
	
			
			
			 Trenton H
						Trenton H
					
				
			
						parent
						
							0a81439415
						
					
				
				
					commit
					b479027f3d
				
			
							
								
								
									
										25
									
								
								.github/workflows/installer-library.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										25
									
								
								.github/workflows/installer-library.yml
									
									
									
									
										vendored
									
									
								
							| @@ -50,6 +50,11 @@ jobs: | |||||||
|         uses: actions/setup-python@v4 |         uses: actions/setup-python@v4 | ||||||
|         with: |         with: | ||||||
|           python-version: "3.9" |           python-version: "3.9" | ||||||
|  |       - | ||||||
|  |         name: Install jq | ||||||
|  |         run: | | ||||||
|  |           sudo apt-get update | ||||||
|  |           sudo apt-get install jq | ||||||
|       - |       - | ||||||
|         name: Setup qpdf image |         name: Setup qpdf image | ||||||
|         id: qpdf-setup |         id: qpdf-setup | ||||||
| @@ -86,6 +91,18 @@ jobs: | |||||||
|           echo ${build_json} |           echo ${build_json} | ||||||
|  |  | ||||||
|           echo "jbig2enc-json=${build_json}" >> $GITHUB_OUTPUT |           echo "jbig2enc-json=${build_json}" >> $GITHUB_OUTPUT | ||||||
|  |       - | ||||||
|  |         name: Setup other versions | ||||||
|  |         id: cache-bust-setup | ||||||
|  |         run: | | ||||||
|  |           pillow_version=$(jq ".default.pillow.version" Pipfile.lock | sed 's/=//g' | sed 's/"//g') | ||||||
|  |           lxml_version=$(jq ".default.lxml.version" Pipfile.lock | sed 's/=//g' | sed 's/"//g') | ||||||
|  |  | ||||||
|  |           echo "Pillow is ${pillow_version}" | ||||||
|  |           echo "lxml is ${lxml_version}" | ||||||
|  |  | ||||||
|  |           echo "pillow-version=${pillow_version}" >> $GITHUB_OUTPUT | ||||||
|  |           echo "lxml-version=${lxml_version}" >> $GITHUB_OUTPUT | ||||||
|  |  | ||||||
|     outputs: |     outputs: | ||||||
|  |  | ||||||
| @@ -97,7 +114,11 @@ jobs: | |||||||
|  |  | ||||||
|       psycopg2-json: ${{ steps.psycopg2-setup.outputs.psycopg2-json }} |       psycopg2-json: ${{ steps.psycopg2-setup.outputs.psycopg2-json }} | ||||||
|  |  | ||||||
|       jbig2enc-json: ${{ steps.jbig2enc-setup.outputs.jbig2enc-json}} |       jbig2enc-json: ${{ steps.jbig2enc-setup.outputs.jbig2enc-json }} | ||||||
|  |  | ||||||
|  |       pillow-version: ${{ steps.cache-bust-setup.outputs.pillow-version }} | ||||||
|  |  | ||||||
|  |       lxml-version: ${{ steps.cache-bust-setup.outputs.lxml-version }} | ||||||
|  |  | ||||||
|   build-qpdf-debs: |   build-qpdf-debs: | ||||||
|     name: qpdf |     name: qpdf | ||||||
| @@ -145,3 +166,5 @@ jobs: | |||||||
|         REPO=${{ needs.prepare-docker-build.outputs.ghcr-repository }} |         REPO=${{ needs.prepare-docker-build.outputs.ghcr-repository }} | ||||||
|         QPDF_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.qpdf-json).version }} |         QPDF_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.qpdf-json).version }} | ||||||
|         PIKEPDF_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.pikepdf-json).version }} |         PIKEPDF_VERSION=${{ fromJSON(needs.prepare-docker-build.outputs.pikepdf-json).version }} | ||||||
|  |         PILLOW_VERSION=${{ needs.prepare-docker-build.outputs.pillow-version }} | ||||||
|  |         LXML_VERSION=${{ needs.prepare-docker-build.outputs.lxml-version }} | ||||||
|   | |||||||
| @@ -23,6 +23,7 @@ fi | |||||||
| # Parse what we can from Pipfile.lock | # Parse what we can from Pipfile.lock | ||||||
| pikepdf_version=$(jq ".default.pikepdf.version" Pipfile.lock  | sed 's/=//g' | sed 's/"//g') | pikepdf_version=$(jq ".default.pikepdf.version" Pipfile.lock  | sed 's/=//g' | sed 's/"//g') | ||||||
| psycopg2_version=$(jq ".default.psycopg2.version" Pipfile.lock | sed 's/=//g' | sed 's/"//g') | psycopg2_version=$(jq ".default.psycopg2.version" Pipfile.lock | sed 's/=//g' | sed 's/"//g') | ||||||
|  | pillow_version=$(jq ".default.pillow.version" Pipfile.lock | sed 's/=//g' | sed 's/"//g') | ||||||
| # Read this from the other config file | # Read this from the other config file | ||||||
| qpdf_version=$(jq ".qpdf.version" .build-config.json | sed 's/"//g') | qpdf_version=$(jq ".qpdf.version" .build-config.json | sed 's/"//g') | ||||||
| jbig2enc_version=$(jq ".jbig2enc.version" .build-config.json | sed 's/"//g') | jbig2enc_version=$(jq ".jbig2enc.version" .build-config.json | sed 's/"//g') | ||||||
| @@ -40,4 +41,5 @@ docker build --file "$1" \ | |||||||
| 	--build-arg JBIG2ENC_VERSION="${jbig2enc_version}" \ | 	--build-arg JBIG2ENC_VERSION="${jbig2enc_version}" \ | ||||||
| 	--build-arg QPDF_VERSION="${qpdf_version}" \ | 	--build-arg QPDF_VERSION="${qpdf_version}" \ | ||||||
| 	--build-arg PIKEPDF_VERSION="${pikepdf_version}" \ | 	--build-arg PIKEPDF_VERSION="${pikepdf_version}" \ | ||||||
|  | 	--build-arg PILLOW_VERSION="${pillow_version}" \ | ||||||
| 	--build-arg PSYCOPG2_VERSION="${psycopg2_version}" "${@:2}" . | 	--build-arg PSYCOPG2_VERSION="${psycopg2_version}" "${@:2}" . | ||||||
|   | |||||||
| @@ -1,14 +0,0 @@ | |||||||
| # This Dockerfile compiles the frontend |  | ||||||
| # Inputs: None |  | ||||||
|  |  | ||||||
| FROM node:16-bullseye-slim AS compile-frontend |  | ||||||
|  |  | ||||||
| COPY ./src /src/src |  | ||||||
| COPY ./src-ui /src/src-ui |  | ||||||
|  |  | ||||||
| WORKDIR /src/src-ui |  | ||||||
| RUN set -eux \ |  | ||||||
|   && npm update npm -g \ |  | ||||||
|   && npm ci --omit=optional |  | ||||||
| RUN set -eux \ |  | ||||||
|   && ./node_modules/.bin/ng build --configuration production |  | ||||||
| @@ -18,6 +18,10 @@ LABEL org.opencontainers.image.description="A intermediate image with pikepdf wh | |||||||
|  |  | ||||||
| ARG DEBIAN_FRONTEND=noninteractive | ARG DEBIAN_FRONTEND=noninteractive | ||||||
| ARG PIKEPDF_VERSION | ARG PIKEPDF_VERSION | ||||||
|  | # These not not used, but will still bust the cache if one changes | ||||||
|  | # Otherwise, the main image will try to build thing (and fail) | ||||||
|  | ARG PILLOW_VERSION | ||||||
|  | ARG LXML_VERSION | ||||||
|  |  | ||||||
| ARG BUILD_PACKAGES="\ | ARG BUILD_PACKAGES="\ | ||||||
|   build-essential \ |   build-essential \ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user