test
This commit is contained in:
		
							
								
								
									
										13
									
								
								action.yml
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								action.yml
									
									
									
									
									
								
							@@ -29,11 +29,24 @@ runs:
 | 
			
		||||
         cat Dockerfile'
 | 
			
		||||
 | 
			
		||||
  - name: build docker image
 | 
			
		||||
    if: ${{ inputs.dockerfile == '' }} 
 | 
			
		||||
    uses: docker://docker:git
 | 
			
		||||
    with:
 | 
			
		||||
      entrypoint: "/bin/sh"
 | 
			
		||||
      args: |
 | 
			
		||||
        -c 'docker build -t ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} . && \
 | 
			
		||||
           echo ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}已经构建完了 && \
 | 
			
		||||
           docker login ${{env.DOCKER_REGISTRY}} -u ${{env.DOCKER_USER}} -p ${{env.DOCKER_PASS}} && \
 | 
			
		||||
           docker push ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} && \
 | 
			
		||||
           echo ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}推送成功'
 | 
			
		||||
 | 
			
		||||
  - name: build docker image use custom dockerfile
 | 
			
		||||
    if: ${{ inputs.dockerfile != '' }} 
 | 
			
		||||
    uses: docker://docker:git
 | 
			
		||||
    with:
 | 
			
		||||
      entrypoint: "/bin/sh"
 | 
			
		||||
      args: |
 | 
			
		||||
        -c 'docker build -t ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} -f ${{inputs.dockerfile}} . && \
 | 
			
		||||
           echo ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }}已经构建完了 && \
 | 
			
		||||
           docker login ${{env.DOCKER_REGISTRY}} -u ${{env.DOCKER_USER}} -p ${{env.DOCKER_PASS}} && \
 | 
			
		||||
           docker push ${{env.DOCKER_REGISTRY}}/${{github.repository}}:${{ github.ref_name }} && \
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user