-
Notifications
You must be signed in to change notification settings - Fork 1.1k
devops: push Docker image to MCR #299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
aslushnikov
merged 5 commits into
microsoft:master
from
mxschmitt:devops/push-image-mcr
Nov 30, 2020
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
157ff93
devops: push Docker image to MCR
mxschmitt 7c56f6c
chore: remove unrelevant comment in GHA file
mxschmitt fcdcc0e
Merge branch 'master' of https://github.com/microsoft/playwright-pyth…
mxschmitt 7be808c
test if it works now
mxschmitt 0e7327f
fix: it
mxschmitt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| name: "devrelease:docker" | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - release-* | ||
| paths: | ||
| - .github/workflows/publish_canary_docker.yml | ||
|
|
||
| jobs: | ||
| publish-canary-docker: | ||
| name: "publish to DockerHub" | ||
| runs-on: ubuntu-20.04 | ||
| if: github.repository == 'microsoft/playwright-python' | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - uses: azure/docker-login@v1 | ||
| with: | ||
| login-server: playwright.azurecr.io | ||
| username: playwright | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| - uses: microsoft/playwright-github-action@v1 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v2 | ||
| with: | ||
| python-version: 3.8 | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r local-requirements.txt | ||
| pip install -e . | ||
| - name: Build package | ||
| run: python build_package.py | ||
| - name: Install | ||
| run: python -m playwright install | ||
| - run: docker build -t playwright-python:localbuild . | ||
| - name: tag & publish | ||
| run: | | ||
| ./scripts/tag_image_and_push.sh playwright-python:localbuild playwright.azurecr.io/public/playwright-python:next | ||
| ./scripts/tag_image_and_push.sh playwright-python:localbuild playwright.azurecr.io/public/playwright-python:next-focal | ||
| ./scripts/tag_image_and_push.sh playwright-python:localbuild playwright.azurecr.io/public/playwright-python:sha-${{ github.sha }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo "-- tagging: $2" | ||
| docker tag $1 $2 | ||
| docker push $2 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious, why do we need this one?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also remove the canary builds. They were useful for testing and Lushnikov and me used them a lot so I think it brings value.