Skip to content

Merge pull request #40 from rohitkumbhar/rohitkumbhar-patch-1 #46

Merge pull request #40 from rohitkumbhar/rohitkumbhar-patch-1

Merge pull request #40 from rohitkumbhar/rohitkumbhar-patch-1 #46

Workflow file for this run

name: Docker Image Build
on:
push:
branches: [ "main" ]
tags:
- '*'
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Docker Meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/rohitkumbhar/surmai
- name: Login to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_PACKAGE_PAT }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}