feat: build multi platform docker images #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Latest tag For Releases | |
on: | |
push: | |
branches: [main] | |
tags: | |
- "*" | |
merge_group: | |
pull_request: | |
branches: | |
- main | |
- 'feature/**' | |
- 'v[0-9]+.[0-9]+' | |
jobs: | |
tag-docker-image: | |
name: Retag image and push to DockerHub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: all | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Create builder | |
run: docker buildx create --name mybuilder --use | |
- name: Inspect builder | |
run: docker buildx inspect --bootstrap | |
- name: Pull and retag image | |
run: | | |
docker pull blockopsnetwork/telescope:2024-06-24-1d0217f | |
docker buildx imagetools create --tag blockopsnetwork/telescope:2024-06-24-1d0217f blockopsnetwork/telescope:edge | |
- name: Push image | |
run: | | |
docker push blockopsnetwork/telescope:edge |