Skip to content

feat: optimised docker file #1

feat: optimised docker file

feat: optimised docker file #1

name: Build and publish Docker Image to Dockerhub
on:
push:
branches:
- 'main'
paths-ignore:
- '**.md'
- 'LICENSE'
jobs:
docker:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v2
with:
images: metakgp/kronos
- name: Build and push docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: metakgp/kronos:latest
labels: ${{ steps.meta.outputs.labels }}