From 945e4fe4b9f53a0225d85ef55f4b70b4775730e7 Mon Sep 17 00:00:00 2001 From: Daniele Lisi <22307776+danielelisi@users.noreply.github.com> Date: Fri, 9 Dec 2022 12:46:47 -0800 Subject: [PATCH] Upgrade to latest docker action and build multi-arch images --- .github/workflows/build.yml | 2 +- .github/workflows/dockerhub-tags.yml | 19 +++++++++++++------ .github/workflows/dockerhub.yml | 23 +++++++++++++++-------- .github/workflows/ghcr.yml | 15 ++++++++++----- 4 files changed, 39 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 76ab70f3c..c41aebc62 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: SonarCloud on: push: branches: - - master + - 'taqueria' pull_request: types: [opened, synchronize, reopened] diff --git a/.github/workflows/dockerhub-tags.yml b/.github/workflows/dockerhub-tags.yml index ca5215bb2..0841dcf78 100644 --- a/.github/workflows/dockerhub-tags.yml +++ b/.github/workflows/dockerhub-tags.yml @@ -11,30 +11,37 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set env run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Log in to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push TzKT Sync image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . + platforms: linux/amd64,linux/arm64v8 file: Tzkt.Sync/Dockerfile push: true - tags: bakingbad/tzkt-sync:${{ env.RELEASE_VERSION }} + tags: ecadlabs/tzkt-sync:${{ env.RELEASE_VERSION }} - name: Build and push TzKT API image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . + platforms: linux/amd64,linux/arm64v8 file: Tzkt.Api/Dockerfile push: true - tags: bakingbad/tzkt-api:${{ env.RELEASE_VERSION }} \ No newline at end of file + tags: ecadlabs/tzkt-api:${{ env.RELEASE_VERSION }} diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index cc4fc67a0..71326af01 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -3,7 +3,7 @@ name: Dockerhub on: push: branches: - - 'master' + - 'taqueria' jobs: push_to_registry: @@ -13,38 +13,45 @@ jobs: - name: Check out the repo uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Log in to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push TzKT Sync image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . + platforms: linux/amd64,linux/arm64v8 file: Tzkt.Sync/Dockerfile push: true - tags: bakingbad/tzkt-sync:latest + tags: ecadlabs/tzkt-sync:latest - name: Build and push TzKT API image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . + platforms: linux/amd64,linux/arm64v8 file: Tzkt.Api/Dockerfile push: true - tags: bakingbad/tzkt-api:latest + tags: ecadlabs/tzkt-api:latest - name: Docker Hub TzKT Sync Description Update uses: peter-evans/dockerhub-description@v2 with: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - repository: bakingbad/tzkt-sync + repository: ecadlabs/tzkt-sync - name: Docker Hub TzKT API Description Update uses: peter-evans/dockerhub-description@v2 with: username: ${{ secrets.DOCKER_LOGIN }} password: ${{ secrets.DOCKERHUB_PASSWORD }} - repository: bakingbad/tzkt-api \ No newline at end of file + repository: ecadlabs/tzkt-api diff --git a/.github/workflows/ghcr.yml b/.github/workflows/ghcr.yml index 3e45c6344..3fe1e6b9d 100644 --- a/.github/workflows/ghcr.yml +++ b/.github/workflows/ghcr.yml @@ -2,12 +2,12 @@ name: Build on: push: branches: - - 'master' + - 'taqueria' tags: - 'v*.*.*' pull_request: branches: - - 'master' + - 'taqueria' jobs: build: @@ -19,13 +19,16 @@ jobs: DOCKER_IMAGE_BASE: ${{ github.repository }} steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Log in to the registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ${{ env.DOCKER_REGISTRY }} username: ${{ github.actor }} @@ -43,6 +46,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . + platforms: linux/amd64,linux/arm64v8 file: Tzkt.Api/Dockerfile push: true cache-from: type=gha @@ -62,6 +66,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . + platforms: linux/amd64,linux/arm64v8 file: Tzkt.Sync/Dockerfile push: true cache-from: type=gha