This commit is contained in:
		
							parent
							
								
									7ba3c68e99
								
							
						
					
					
						commit
						6fa7987ea9
					
				|  | @ -1,28 +1,29 @@ | ||||||
| --- |  | ||||||
| name: push | name: push | ||||||
| on: | on: | ||||||
|     push: |   push: | ||||||
|         branches: |     branches: | ||||||
|             - golang-ubuntu-latest |       - golang-ubuntu-latest | ||||||
| jobs: | jobs: | ||||||
|     build: |   build: | ||||||
|         runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|         steps: |     steps: | ||||||
|             - name: Check out repository code |       - name: Check out repository code | ||||||
|               uses: actions/checkout@focs |         uses: actions/checkout@focs | ||||||
|             - name: Determine build command |       - name: Determine build command | ||||||
|               id: build_command |         id: build_command | ||||||
|               run: | |         run: | | ||||||
|                 if echo "${{ github.event.head_commit.message }}" | grep -q "force build"; then |           if echo "${{ github.event.head_commit.message }}" | grep -q "force build"; then | ||||||
|                   echo "build_command=make force-build" >> $GITHUB_ENV |             echo "build_command=make force-build" >> $GITHUB_ENV | ||||||
|                 else |           else | ||||||
|                   echo "build_command=make build" >> $GITHUB_ENV |             echo "build_command=make build" >> $GITHUB_ENV | ||||||
|                 fi |           fi | ||||||
|             - name: Build |       - name: Build | ||||||
|               run: ${{ env.build_command }} |         run: ${{ env.build_command }} | ||||||
|             - name: Check images |       - name: Check images | ||||||
|               run: docker images |         run: docker images | ||||||
|             - name: Remove dangling images |       - name: Remove dangling images | ||||||
|               run: docker image prune -f |         run: docker image prune -f | ||||||
|             - name: Push |       - name: Docker Login | ||||||
|               run: make push |         run: "echo \"${{ secrets.DOCKER_PASSWORD }}\" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin focs.ji.sjtu.edu.cn:5000          \n" | ||||||
|  |       - name: Docker Push | ||||||
|  |         run: make push | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user