From e26a2710bd69297fff9a5cc1d8a2d1fd2eb23f78 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 9 Feb 2024 14:54:18 +0100 Subject: [PATCH] devops: simplify Docker publishing (#1481) --- .github/workflows/publish_canary_docker.yml | 25 ------------------- ..._docker_release.yml => publish_docker.yml} | 10 +++----- utils/docker/publish_docker.sh | 6 ----- 3 files changed, 4 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/publish_canary_docker.yml rename .github/workflows/{publish_docker_release.yml => publish_docker.yml} (86%) diff --git a/.github/workflows/publish_canary_docker.yml b/.github/workflows/publish_canary_docker.yml deleted file mode 100644 index 963daae8..00000000 --- a/.github/workflows/publish_canary_docker.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: "devrelease:docker" - -on: - push: - branches: - - main -jobs: - publish-canary-docker: - name: "publish to DockerHub" - runs-on: ubuntu-20.04 - if: github.repository == 'microsoft/playwright-java' - steps: - - uses: actions/checkout@v2 - - uses: azure/docker-login@v1 - with: - login-server: playwright.azurecr.io - username: playwright - password: ${{ secrets.DOCKER_PASSWORD }} - - uses: actions/checkout@v2 - - name: Set up Docker QEMU for arm64 docker builds - uses: docker/setup-qemu-action@v1 - with: - platforms: arm64 - - name: publish docker canary - run: ./utils/docker/publish_docker.sh canary diff --git a/.github/workflows/publish_docker_release.yml b/.github/workflows/publish_docker.yml similarity index 86% rename from .github/workflows/publish_docker_release.yml rename to .github/workflows/publish_docker.yml index 357ad573..354194ff 100644 --- a/.github/workflows/publish_docker_release.yml +++ b/.github/workflows/publish_docker.yml @@ -8,25 +8,23 @@ on: required: true type: boolean description: "Is this a release image?" - branches: - - release-* jobs: publish-canary-docker: name: publish to DockerHub - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 if: github.repository == 'microsoft/playwright-java' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: azure/docker-login@v1 with: login-server: playwright.azurecr.io username: playwright password: ${{ secrets.DOCKER_PASSWORD }} - name: Set up Docker QEMU for arm64 docker builds - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v3 with: platforms: arm64 - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: ./utils/docker/publish_docker.sh stable if: (github.event_name != 'workflow_dispatch' && !github.event.release.prerelease) || (github.event_name == 'workflow_dispatch' && github.event.inputs.is_release == 'true') - run: ./utils/docker/publish_docker.sh canary diff --git a/utils/docker/publish_docker.sh b/utils/docker/publish_docker.sh index 21ad01b9..9811d8b0 100755 --- a/utils/docker/publish_docker.sh +++ b/utils/docker/publish_docker.sh @@ -29,11 +29,6 @@ else exit 1 fi -if [[ -z "${GITHUB_SHA}" ]]; then - echo "ERROR: GITHUB_SHA env variable must be specified" - exit 1 -fi - FOCAL_TAGS=( "next-focal" ) @@ -46,7 +41,6 @@ fi JAMMY_TAGS=( "next" "next-jammy" - "sha-${GITHUB_SHA}" ) if [[ "$RELEASE_CHANNEL" == "stable" ]]; then