mirror of
				https://github.com/D4M13N-D3V/comissions-app-core-api.git
				synced 2025-10-31 01:25:27 +00:00 
			
		
		
		
	feat:github workflows
This commit is contained in:
		
							parent
							
								
									003bb0413c
								
							
						
					
					
						commit
						b2bde92d05
					
				
							
								
								
									
										55
									
								
								.github/workflows/build-image.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								.github/workflows/build-image.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,55 @@ | |||||||
|  | name: build-image | ||||||
|  | on: | ||||||
|  |   push: | ||||||
|  |     branches: [main] | ||||||
|  | 
 | ||||||
|  | jobs: | ||||||
|  |   build-image: | ||||||
|  |     runs-on: [ubuntu-latest] | ||||||
|  |     env: | ||||||
|  |       DOTNET_INSTALL_DIR: "/home/runner" | ||||||
|  |     permissions: | ||||||
|  |       contents: write | ||||||
|  |       packages: write | ||||||
|  |     steps: | ||||||
|  |       - name: 'Cleanup build folder' | ||||||
|  |         run: | | ||||||
|  |           rm ./* -r || true | ||||||
|  |           rm ./.??* -r  || true | ||||||
|  |          | ||||||
|  |       - uses: actions/setup-dotnet@v3 | ||||||
|  |         with: | ||||||
|  |           dotnet-version: 6.0.x | ||||||
|  | 
 | ||||||
|  |       - name: Set up GitVersion | ||||||
|  |         uses: gittools/actions/gitversion/setup@v0.9.15 | ||||||
|  |         with: | ||||||
|  |           versionSpec: '5.x' | ||||||
|  |      | ||||||
|  |       - name: Checkout code | ||||||
|  |         uses: actions/checkout@v3 | ||||||
|  |         with: | ||||||
|  |           fetch-depth: 0 | ||||||
|  | 
 | ||||||
|  |       - name: Execute GitVersion | ||||||
|  |         uses: gittools/actions/gitversion/execute@v0.9.15 | ||||||
|  |         with: | ||||||
|  |           useConfigFile: true | ||||||
|  |           configFilePath: GitVersion.yml | ||||||
|  | 
 | ||||||
|  |       - name: login into registry | ||||||
|  |         run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u $ --password-stdin | ||||||
|  | 
 | ||||||
|  |       - name: Build image | ||||||
|  |         env: | ||||||
|  |           dockerfile: ./src/ArtPlatform.API/Dockerfile | ||||||
|  |           docker_image_name: ghcr.io/d4m13n-d3v/art-platform-api | ||||||
|  |         run: | | ||||||
|  |           docker build --build-arg NUGET_SOURCE=https://nuget.pkg.github.com/data443/index.json --build-arg NUGET_API_KEY=${{ secrets.PACKAGE_TOKEN }} -t ${{ env.docker_image_name }}:${{ env.GitVersion_MajorMinorPatch }} -f ${{ env.dockerfile }} --force-rm . | ||||||
|  |           docker tag ${{ env.docker_image_name }}:${{ env.GitVersion_MajorMinorPatch }} ${{ env.docker_image_name }}:latest | ||||||
|  |           docker push --all-tags ${{ env.docker_image_name }} | ||||||
|  | 
 | ||||||
|  |       - name: Tag branch | ||||||
|  |         run: | | ||||||
|  |           git tag ${{ env.GitVersion_MajorMinorPatch }} | ||||||
|  |           git push origin ${{ env.GitVersion_MajorMinorPatch }} | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Damien Ostler
						Damien Ostler