mirror of
				https://github.com/microsoft/playwright.git
				synced 2025-06-26 21:40:17 +00:00 
			
		
		
		
	devops: fix docker publishing (#2939)
- Repository name has to start with `public/` to be exported to dockerhub. - Remove `DOCKER_USERNAME` to avoid unnecessary masking in our logs. - Publish dev versions of Docker image only when changes to docker file happen. (this is why NPM publishing and Docker publishing for dev releases are now separate). - Release publishing in two separate jobs to make them independent. References #2926
This commit is contained in:
		
							parent
							
								
									b7d68d1cdb
								
							
						
					
					
						commit
						d58a57c4b2
					
				
							
								
								
									
										27
									
								
								.github/workflows/publish_canary_docker.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								.github/workflows/publish_canary_docker.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | |||||||
|  | name: "devrelease" | ||||||
|  | 
 | ||||||
|  | on: | ||||||
|  |   push: | ||||||
|  |     branches: | ||||||
|  |       - master | ||||||
|  |       - release-* | ||||||
|  |     paths: | ||||||
|  |       - docs/docker/** | ||||||
|  | 
 | ||||||
|  | jobs: | ||||||
|  |   publish-canary-docker: | ||||||
|  |     name: "publish to DockerHub" | ||||||
|  |     runs-on: ubuntu-18.04 | ||||||
|  |     steps: | ||||||
|  |     - uses: actions/checkout@v2 | ||||||
|  |     - uses: docker/build-push-action@v1 | ||||||
|  |       with: | ||||||
|  |         username: playwright | ||||||
|  |         password: ${{ secrets.DOCKER_PASSWORD }} | ||||||
|  |         registry: playwright.azurecr.io | ||||||
|  |         repository: public/playwright | ||||||
|  |         path: docs/docker/ | ||||||
|  |         dockerfile: docs/docker/Dockerfile.bionic | ||||||
|  |         tags: dev | ||||||
|  |         tag_with_sha: true | ||||||
|  | 
 | ||||||
| @ -1,4 +1,4 @@ | |||||||
| name: "canary" | name: "devrelease" | ||||||
| 
 | 
 | ||||||
| on: | on: | ||||||
|   push: |   push: | ||||||
| @ -10,8 +10,8 @@ env: | |||||||
|   CI: true |   CI: true | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   publish-canary: |   publish-canary-npm: | ||||||
|     name: "publish" |     name: "publish to NPM" | ||||||
|     runs-on: ubuntu-18.04 |     runs-on: ubuntu-18.04 | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v2 |     - uses: actions/checkout@v2 | ||||||
| @ -26,14 +26,4 @@ jobs: | |||||||
|     - run: utils/publish_all_packages.sh --tip-of-tree |     - run: utils/publish_all_packages.sh --tip-of-tree | ||||||
|       env: |       env: | ||||||
|         NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |         NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||||||
|     - uses: docker/build-push-action@v1 |  | ||||||
|       with: |  | ||||||
|         username: ${{ secrets.DOCKER_USERNAME }} |  | ||||||
|         password: ${{ secrets.DOCKER_PASSWORD }} |  | ||||||
|         registry: playwright.azurecr.io |  | ||||||
|         repository: microsoft/playwright |  | ||||||
|         path: docs/docker/ |  | ||||||
|         dockerfile: docs/docker/Dockerfile.bionic |  | ||||||
|         tags: dev |  | ||||||
|         tag_with_sha: true |  | ||||||
| 
 | 
 | ||||||
							
								
								
									
										14
									
								
								.github/workflows/publish_release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.github/workflows/publish_release.yml
									
									
									
									
										vendored
									
									
								
							| @ -8,8 +8,8 @@ env: | |||||||
|   CI: true |   CI: true | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   publish-canary: |   publish-npm-release: | ||||||
|     name: "publish" |     name: "publish to NPM" | ||||||
|     runs-on: ubuntu-18.04 |     runs-on: ubuntu-18.04 | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v2 |     - uses: actions/checkout@v2 | ||||||
| @ -23,12 +23,18 @@ jobs: | |||||||
|     - run: utils/publish_all_packages.sh --release |     - run: utils/publish_all_packages.sh --release | ||||||
|       env: |       env: | ||||||
|         NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |         NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||||||
|  | 
 | ||||||
|  |   publish-docker-release: | ||||||
|  |     name: "publish to DockerHub" | ||||||
|  |     runs-on: ubuntu-18.04 | ||||||
|  |     steps: | ||||||
|  |     - uses: actions/checkout@v2 | ||||||
|     - uses: docker/build-push-action@v1 |     - uses: docker/build-push-action@v1 | ||||||
|       with: |       with: | ||||||
|         username: ${{ secrets.DOCKER_USERNAME }} |         username: playwright | ||||||
|         password: ${{ secrets.DOCKER_PASSWORD }} |         password: ${{ secrets.DOCKER_PASSWORD }} | ||||||
|         registry: playwright.azurecr.io |         registry: playwright.azurecr.io | ||||||
|         repository: microsoft/playwright |         repository: public/playwright | ||||||
|         path: docs/docker/ |         path: docs/docker/ | ||||||
|         dockerfile: docs/docker/Dockerfile.bionic |         dockerfile: docs/docker/Dockerfile.bionic | ||||||
|         tags: bionic,latest |         tags: bionic,latest | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Andrey Lushnikov
						Andrey Lushnikov