Skip to content

Updating docker-compose #11

Updating docker-compose

Updating docker-compose #11

name: Build and Push Docker Images
on:
push:
branches: [ "master" ]
workflow_dispatch:
env:
IMAGE_NAME: mlmodelscope-api
IMAGE_TAGS: ${{ github.run_number }}
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build Image
run: ./scripts/build-container.sh api ${IMAGE_TAGS} ${IMAGE_REGISTRY}
- name: Push to GHCR
id: push-to-ghcr
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_TAGS }} latest
registry: ${{ env.IMAGE_REGISTRY }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
- name: Print image URL
run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.registry-paths }}"