devops: try to use azure/docker-login instead of manual login (#3714)

Manual login appeared to be successful, but rejected docker push.

References #2926
This commit is contained in:
Andrey Lushnikov 2020-09-01 14:24:42 -07:00 committed by GitHub
parent fad840d88d
commit ba7093cbe8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,20 +16,23 @@ jobs:
if: github.repository == 'microsoft/playwright' if: github.repository == 'microsoft/playwright'
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: azure/docker-login@v1
with:
login-server: playwright.azurecr.io
username: playwright
password: ${{ secrets.DOCKER_PASSWORD }}
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
with: with:
node-version: 10.15 node-version: 10.15
- run: npm ci - run: npm ci
- run: npm run build - run: npm run build
- name: login & publish to docker - name: docker: build & publish
run: | run: |
# login to docker
docker login --username playwright --password ${{ secrets.DOCKER_PASSWORD }} playwright.azurecr.io
# build docker image # build docker image
./docs/docker/build.sh ./docs/docker/build.sh
# tag image accordingly # tag image accordingly
docker tag playwright:localbuild public/playwright:next docker tag playwright:localbuild public/playwright:next
docker tag playwright:localbuild public/playwright:sha-$(git rev-parse HEAD) docker tag playwright:localbuild public/playwright:sha-${{ github.sha }}
docker rmi playwright:localbuild docker rmi playwright:localbuild
# push image to registry # push image to registry
docker push public/playwright:next docker push public/playwright:next