ci: only run latest tag job on push / release (#586)
* ci: only run latest tag job on merge * ci: update job conditional
This commit is contained in:
		
							parent
							
								
									605dae3995
								
							
						
					
					
						commit
						198b13324d
					
				|  | @ -76,6 +76,7 @@ jobs: | ||||||
|             ${{ env.DOCKERHUB_USERNAME }}/${{ matrix.name }}:v${{ env.RUNNER_VERSION }}-ubuntu-${{ matrix.os-version }}-${{ steps.vars.outputs.sha_short }} |             ${{ env.DOCKERHUB_USERNAME }}/${{ matrix.name }}:v${{ env.RUNNER_VERSION }}-ubuntu-${{ matrix.os-version }}-${{ steps.vars.outputs.sha_short }} | ||||||
| 
 | 
 | ||||||
|   latest-tags: |   latest-tags: | ||||||
|  |     if: ${{ github.event_name == 'push' || github.event_name == 'release' }} | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     name: Build ${{ matrix.name }}-latest |     name: Build ${{ matrix.name }}-latest | ||||||
|     strategy: |     strategy: | ||||||
|  | @ -104,7 +105,6 @@ jobs: | ||||||
| 
 | 
 | ||||||
|       - name: Login to DockerHub |       - name: Login to DockerHub | ||||||
|         uses: docker/login-action@v1 |         uses: docker/login-action@v1 | ||||||
|         if: ${{ github.event_name == 'push' || github.event_name == 'release' }} |  | ||||||
|         with: |         with: | ||||||
|           username: ${{ secrets.DOCKER_USER }} |           username: ${{ secrets.DOCKER_USER }} | ||||||
|           password: ${{ secrets.DOCKER_ACCESS_TOKEN }} |           password: ${{ secrets.DOCKER_ACCESS_TOKEN }} | ||||||
|  | @ -115,7 +115,7 @@ jobs: | ||||||
|           context: ./runner |           context: ./runner | ||||||
|           file: ./runner/${{ matrix.dockerfile }} |           file: ./runner/${{ matrix.dockerfile }} | ||||||
|           platforms: linux/amd64,linux/arm64 |           platforms: linux/amd64,linux/arm64 | ||||||
|           push: ${{ github.event_name != 'pull_request' }} |           push: true | ||||||
|           build-args: | |           build-args: | | ||||||
|             RUNNER_VERSION=${{ env.RUNNER_VERSION }} |             RUNNER_VERSION=${{ env.RUNNER_VERSION }} | ||||||
|             DOCKER_VERSION=${{ env.DOCKER_VERSION }} |             DOCKER_VERSION=${{ env.DOCKER_VERSION }} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue