Skip to content

Merge pull request #178 from burhan-syed/dev #28

Merge pull request #178 from burhan-syed/dev

Merge pull request #178 from burhan-syed/dev #28

Workflow file for this run

name: Build and Publish Docker image on Docker registry
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
paths-ignore:
- "*.md"
- "FUNDING.yml"
- LICENSE
- ".gitattributes"
- ".github/workflows/docker.yml"
- ".dockerignore"
branches:
- "main"
pull_request:
branches:
- "main"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This job pushes a new image on every new commit to the docker hub with the tag 'nightly' and is called 'nightly'
nightly:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v3
# https://github.com/docker/setup-qemu-action#usage
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# setup Docker build action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build image and push to Docker Hub
uses: docker/build-push-action@v4
with:
context: ./
tags: ${{ secrets.DOCKERHUB_REPO }}
push: ${{ github.ref == 'refs/heads/main' }}
# Possible architectures
#platforms: linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/mips64le,linux/mips64,linux/arm/v7,linux/arm/v6
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}