Skip to content

ci: docker build and push (#2) #6

ci: docker build and push (#2)

ci: docker build and push (#2) #6

Workflow file for this run

name: docker
on:
workflow_dispatch:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
id: docker_login
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
if: ${{ github.event_name != 'pull_request' && env.DOCKERHUB_USERNAME && env.DOCKERHUB_TOKEN }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: push
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name != 'pull_request' && steps.docker_login.outcome == 'success' }}
tags: 0xpolygon/panoptichain:${{ github.ref_type == 'tag' && github.ref_name || 'latest' }}
platforms: linux/amd64,linux/arm64