Skip to content

add ci/cd pipeline to build and publish docker images #1

add ci/cd pipeline to build and publish docker images

add ci/cd pipeline to build and publish docker images #1

name: Build & Push Data Ingestion Task
on:
push:
branches: [ "main" ]
paths:
- "docker/data_ingestion/**"
- "src/data_ingestion/**"
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository_owner }}/data-ingestion-task
tags: |
type=raw,value=latest
- name: Build & Push Data Ingestion Task Image
uses: docker/build-push-action@v4
with:
context: .
file: docker/data_ingestion/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}