Skip to content

chore: update Dockerfile to add python specific enviornmental variabl… #16

chore: update Dockerfile to add python specific enviornmental variabl…

chore: update Dockerfile to add python specific enviornmental variabl… #16

name: Build and Push Docker Image
on:
push:
branches: [ main ]
paths:
- 'Dockerfile'
- '.github/workflows/docker-publish.yml'
- 'src/**'
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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 GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/forecast-model-api:latest