mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 10:13:14 -04:00 
			
		
		
		
	Add github actions for docker release. (#5146)
* Add github actions for docker release. Once a release/tag shown up in GitHub, an GitHub Action will be automatically triggered for docker release. This will help avoid additional steps when releasing. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Update to address the review Signed-off-by: Yong Tang <yong.tang.github@outlook.com> * Address review comment Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
		
							
								
								
									
										26
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								.github/workflows/docker.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,26 @@ | |||||||
|  | name: Docker Release | ||||||
|  |  | ||||||
|  | on: | ||||||
|  |   release: | ||||||
|  |     types: [published] | ||||||
|  |   workflow_dispatch: | ||||||
|  |     inputs: | ||||||
|  |       release: | ||||||
|  |         description: "Release (e.g., v1.9.0)" | ||||||
|  |         required: true | ||||||
|  |  | ||||||
|  | jobs: | ||||||
|  |   docker-release: | ||||||
|  |     runs-on: ubuntu-latest | ||||||
|  |     env: | ||||||
|  |       DOCKER_LOGIN: ${{ secrets.DOCKERHUB_USERNAME }} | ||||||
|  |       DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} | ||||||
|  |       RELEASE: ${{ github.event.inputs.release || github.event.release.tag_name }} | ||||||
|  |     steps: | ||||||
|  |       - uses: actions/checkout@v2 | ||||||
|  |       - name: Build Docker Images | ||||||
|  |         run: make VERSION=${RELEASE:1} DOCKER=coredns -f Makefile.docker release | ||||||
|  |       - name: Show Docker Images | ||||||
|  |         run: docker images | ||||||
|  |       - name: Publish Docker Images | ||||||
|  |         run: make VERSION=${RELEASE:1} DOCKER=coredns -f Makefile.docker docker-push | ||||||
		Reference in New Issue
	
	Block a user