mirror of
				https://github.com/Frooodle/Stirling-PDF.git
				synced 2025-10-25 11:17:28 +02:00 
			
		
		
		
	Create docker-image.yml (#5)
* Create docker-image.yml * Update docker-image.yml * Update docker-image.yml * Update docker-image.yml * Update docker-image.yml * Update docker-image.yml * Update docker-image.yml * Update docker-image.yml * Update build.gradle * Update docker-image.yml * Update docker-image.yml * Update and rename docker-image.yml to push-docker.yml * Update push-docker.yml * Update push-docker.yml
This commit is contained in:
		
							parent
							
								
									957241043e
								
							
						
					
					
						commit
						ab50b625d4
					
				
							
								
								
									
										59
									
								
								.github/workflows/push-docker.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								.github/workflows/push-docker.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,59 @@ | ||||
| name: Push Docker Image with VersionNumber | ||||
| 
 | ||||
| on: | ||||
|   push: | ||||
|     branches:  | ||||
|       - master | ||||
|       - main | ||||
| jobs: | ||||
| 
 | ||||
|   build: | ||||
| 
 | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|     - uses: actions/checkout@v3 | ||||
|      | ||||
|     - name: Set up JDK 17 | ||||
|       uses: actions/setup-java@v3 | ||||
|       with: | ||||
|         java-version: '17' | ||||
|         distribution: 'temurin' | ||||
|      | ||||
| 
 | ||||
|     - uses: gradle/gradle-build-action@v2.3.3 | ||||
|       with: | ||||
|         gradle-version: 7.6 | ||||
|         arguments: clean build | ||||
| 
 | ||||
|     - name: Make Gradle wrapper executable | ||||
|       run: chmod +x gradlew | ||||
|        | ||||
|     - name: Get version number | ||||
|       id: versionNumber | ||||
|       run: echo "::set-output name=versionNumber::$(./gradlew printVersion --quiet | tail -1)" | ||||
|      | ||||
|     - name: Login to Docker Hub | ||||
|       uses: docker/login-action@v2.1.0 | ||||
|       with: | ||||
|         username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||||
|         password: ${{ secrets.DOCKER_HUB_API }}  | ||||
|          | ||||
|   | ||||
|     - name: Build and push | ||||
|       uses: docker/build-push-action@v3 | ||||
|       with: | ||||
|         context: . | ||||
|         push: true | ||||
|         tags: | | ||||
|           frooodle/s-pdf:${{ steps.versionNumber.outputs.versionNumber }} | ||||
| 
 | ||||
|     - name: Build and push | ||||
|       uses: docker/build-push-action@v3 | ||||
|       if: github.ref == 'refs/heads/master'  | ||||
|       with: | ||||
|         context: . | ||||
|         push: true | ||||
|         tags: | | ||||
|           frooodle/s-pdf:latest | ||||
| 
 | ||||
| 
 | ||||
| @ -20,6 +20,10 @@ dependencies { | ||||
| 	implementation 'org.apache.logging.log4j:log4j-core:2.19.0' | ||||
| } | ||||
| 
 | ||||
| jar { | ||||
|     enabled = false | ||||
| } | ||||
| 
 | ||||
| tasks.named('test') { | ||||
| 	useJUnitPlatform() | ||||
| } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user