From 5f37523a02010df7e77aa4045c0e3f34a849a960 Mon Sep 17 00:00:00 2001 From: Bradley Bown Date: Fri, 18 Oct 2024 14:51:14 +0100 Subject: [PATCH] Reinstate dockerhub login for build steps --- .../workflows/coordinator-build-and-publish.yml | 15 +++++++-------- .github/workflows/postman-build-and-publish.yml | 15 +++++++-------- .github/workflows/prover-build-and-publish.yml | 15 +++++++-------- .../traces-api-facade-build-and-publish.yml | 15 +++++++-------- 4 files changed, 28 insertions(+), 32 deletions(-) diff --git a/.github/workflows/coordinator-build-and-publish.yml b/.github/workflows/coordinator-build-and-publish.yml index d4bdd7931..be6a4124d 100644 --- a/.github/workflows/coordinator-build-and-publish.yml +++ b/.github/workflows/coordinator-build-and-publish.yml @@ -18,9 +18,9 @@ on: default: false secrets: DOCKERHUB_USERNAME: - required: false + required: true DOCKERHUB_TOKEN: - required: false + required: true workflow_dispatch: inputs: push_image: @@ -59,6 +59,11 @@ jobs: - name: Build dist run: | ./gradlew coordinator:app:distZip --no-daemon + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - local @@ -91,12 +96,6 @@ jobs: with: name: linea-coordinator path: linea-coordinator-docker-image.tar.gz - - name: Login to Docker Hub - if: ${{ env.PUSH_IMAGE == 'true' || github.event_name == 'workflow_dispatch' }} - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build & push uses: docker/build-push-action@v6 if: ${{ env.PUSH_IMAGE == 'true' || github.event_name == 'workflow_dispatch' }} diff --git a/.github/workflows/postman-build-and-publish.yml b/.github/workflows/postman-build-and-publish.yml index 6c41dbd73..a6fa4ec31 100644 --- a/.github/workflows/postman-build-and-publish.yml +++ b/.github/workflows/postman-build-and-publish.yml @@ -18,9 +18,9 @@ on: default: false secrets: DOCKERHUB_USERNAME: - required: false + required: true DOCKERHUB_TOKEN: - required: false + required: true workflow_dispatch: inputs: push_image: @@ -54,6 +54,11 @@ jobs: ssh-key: ${{ secrets.SELF_GITHUB_SSH_KEY }} submodules: true persist-credentials: false + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 with: @@ -87,12 +92,6 @@ jobs: with: name: linea-postman path: linea-postman-docker-image.tar.gz - - name: Login to Docker Hub - if: ${{ env.PUSH_IMAGE == 'true' || github.event_name == 'workflow_dispatch' }} - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push postman image uses: docker/build-push-action@v6 if: ${{ env.PUSH_IMAGE == 'true' || github.event_name == 'workflow_dispatch' }} diff --git a/.github/workflows/prover-build-and-publish.yml b/.github/workflows/prover-build-and-publish.yml index dced3c398..b27b6e50b 100644 --- a/.github/workflows/prover-build-and-publish.yml +++ b/.github/workflows/prover-build-and-publish.yml @@ -18,9 +18,9 @@ on: default: false secrets: DOCKERHUB_USERNAME: - required: false + required: true DOCKERHUB_TOKEN: - required: false + required: true workflow_dispatch: inputs: push_image: @@ -57,6 +57,11 @@ jobs: ssh-key: ${{ secrets.SELF_GITHUB_SSH_KEY }} submodules: true persist-credentials: false + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Show the "version" build argument @@ -90,12 +95,6 @@ jobs: with: name: linea-prover path: linea-prover-docker-image.tar.gz - - name: Login to Docker Hub - if: ${{ env.PUSH_IMAGE == 'true' || github.event_name == 'workflow_dispatch' }} - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push prover image uses: docker/build-push-action@v6 if: ${{ env.PUSH_IMAGE == 'true' || github.event_name == 'workflow_dispatch' }} diff --git a/.github/workflows/traces-api-facade-build-and-publish.yml b/.github/workflows/traces-api-facade-build-and-publish.yml index fe1d3f0f3..5d464b75c 100644 --- a/.github/workflows/traces-api-facade-build-and-publish.yml +++ b/.github/workflows/traces-api-facade-build-and-publish.yml @@ -18,9 +18,9 @@ on: default: false secrets: DOCKERHUB_USERNAME: - required: false + required: true DOCKERHUB_TOKEN: - required: false + required: true workflow_dispatch: inputs: push_image: @@ -63,6 +63,11 @@ jobs: run: | ./gradlew traces-api-facade:app:shadowJar echo ${{ github.workspace }} + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -95,12 +100,6 @@ jobs: with: name: linea-traces-api-facade path: linea-traces-api-facade-docker-image.tar.gz - - name: Login to Docker Hub - if: ${{ env.PUSH_IMAGE == 'true' || github.event_name == 'workflow_dispatch' }} - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build & push uses: docker/build-push-action@v6 if: ${{ env.PUSH_IMAGE == 'true' || github.event_name == 'workflow_dispatch' }}