mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	update the CI/CD scripts to not build and push docker images from master, update 'latest' version together with tagged releases.
This commit is contained in:
		
							
								
								
									
										21
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -225,7 +225,7 @@ jobs: | ||||
|  | ||||
|   # build and push image to docker hub. | ||||
|   build-docker-image: | ||||
|     if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/ng-')) | ||||
|     if: github.event_name == 'push' && (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/ng-')) | ||||
|     runs-on: ubuntu-latest | ||||
|     needs: [frontend, tests] | ||||
|     steps: | ||||
| @@ -233,15 +233,18 @@ jobs: | ||||
|         name: Prepare | ||||
|         id: prepare | ||||
|         run: | | ||||
|           VERSION=edge | ||||
|           IMAGE_NAME=jonaswinkler/paperless-ng | ||||
|           if [[ $GITHUB_REF == refs/tags/ng-* ]]; then | ||||
|             VERSION=${GITHUB_REF#refs/tags/ng-} | ||||
|           elif [[ $GITHUB_REF == refs/heads/master ]]; then | ||||
|             VERSION=latest | ||||
|             TAGS=${IMAGE_NAME}:${GITHUB_REF#refs/tags/ng-},${IMAGE_NAME}:latest | ||||
|             INSPECT_TAG=${IMAGE_NAME}:latest | ||||
|           elif [[ $GITHUB_REF == refs/heads/* ]]; then | ||||
|             VERSION=${GITHUB_REF#refs/heads/} | ||||
|             TAGS=${IMAGE_NAME}:${GITHUB_REF#refs/heads/} | ||||
|             INSPECT_TAG=${TAGS} | ||||
|           else | ||||
|             exit 1 | ||||
|           fi | ||||
|           echo ::set-output name=version::${VERSION} | ||||
|           echo ::set-output name=tags::${TAGS} | ||||
|           echo ::set-output name=inspect_tag::${INSPECT_TAG} | ||||
|       - | ||||
|         name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
| @@ -279,10 +282,10 @@ jobs: | ||||
|           file: ./Dockerfile | ||||
|           platforms: linux/amd64,linux/arm/v7,linux/arm64 | ||||
|           push: true | ||||
|           tags: jonaswinkler/paperless-ng:${{ steps.prepare.outputs.version }} | ||||
|           tags: ${{ steps.prepare.outputs.tags }} | ||||
|           cache-from: type=local,src=/tmp/.buildx-cache | ||||
|           cache-to: type=local,dest=/tmp/.buildx-cache | ||||
|       - | ||||
|         name: Inspect image | ||||
|         run: | | ||||
|           docker buildx imagetools inspect jonaswinkler/paperless-ng:${{ steps.prepare.outputs.version }} | ||||
|           docker buildx imagetools inspect ${{ steps.prepare.outputs.inspect_tag }} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jonaswinkler
					jonaswinkler