Skip to content

Commit

Permalink
Upgrade to latest docker action and build multi-arch images
Browse files Browse the repository at this point in the history
  • Loading branch information
danielelisi committed Dec 9, 2022
1 parent 4d156f1 commit 945e4fe
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: SonarCloud
on:
push:
branches:
- master
- 'taqueria'
pull_request:
types: [opened, synchronize, reopened]

Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/dockerhub-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
tags: ecadlabs/tzkt-api:${{ env.RELEASE_VERSION }}
23 changes: 15 additions & 8 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Dockerhub
on:
push:
branches:
- 'master'
- 'taqueria'

jobs:
push_to_registry:
Expand All @@ -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
repository: ecadlabs/tzkt-api
15 changes: 10 additions & 5 deletions .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: Build
on:
push:
branches:
- 'master'
- 'taqueria'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'master'
- 'taqueria'

jobs:
build:
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 945e4fe

Please sign in to comment.