mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-30 03:56:23 -05:00 
			
		
		
		
	Updates the workflow to enable Docker Hub pushing
This commit is contained in:
		
							
								
								
									
										30
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -63,13 +63,6 @@ jobs: | ||||
|       - | ||||
|         name: Checkout | ||||
|         uses: actions/checkout@v3 | ||||
|       - | ||||
|         name: Login to Github Container Registry | ||||
|         uses: docker/login-action@v1 | ||||
|         with: | ||||
|           registry: ghcr.io | ||||
|           username: ${{ github.actor }} | ||||
|           password: ${{ secrets.GITHUB_TOKEN }} | ||||
|       - | ||||
|         name: Set up Python | ||||
|         uses: actions/setup-python@v3 | ||||
| @@ -247,12 +240,25 @@ jobs: | ||||
|       - build-pikepdf-wheel | ||||
|       - build-frontend | ||||
|     steps: | ||||
|       - | ||||
|         name: Check pushing to Docker Hub | ||||
|         id: docker-hub | ||||
|         # Only push to Dockerhub from the main repo | ||||
|         # Otherwise forks would require a Docker Hub account and secrets setup | ||||
|         run: | | ||||
|           if [[ ${{ github.repository }} == "paperless-ngx/paperless-ngx" ]] ; then | ||||
|             echo ::set-output name=enable::"true" | ||||
|           else | ||||
|             echo ::set-output name=enable::"false" | ||||
|           fi | ||||
|       - | ||||
|         name: Gather Docker metadata | ||||
|         id: docker-meta | ||||
|         uses: docker/metadata-action@v3 | ||||
|         with: | ||||
|           images: ghcr.io/${{ github.repository }} | ||||
|           images: | | ||||
|             ghcr.io/${{ github.repository }} | ||||
|             name=paperlessngx/paperless-ngx,enable=${{ steps.docker-hub.outputs.enable }} | ||||
|           tags: | | ||||
|             type=ref,event=branch | ||||
|             type=ref,event=tag | ||||
| @@ -272,6 +278,14 @@ jobs: | ||||
|           registry: ghcr.io | ||||
|           username: ${{ github.actor }} | ||||
|           password: ${{ secrets.GITHUB_TOKEN }} | ||||
|       - | ||||
|         name: Login to Docker Hub | ||||
|         uses: docker/login-action@v1 | ||||
|         # 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@v2 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Trenton Holmes
					Trenton Holmes