mlflow/.gitea/workflows/release.yaml

31 lines
1.1 KiB
YAML
Raw Normal View History

2024-01-31 10:58:17 +00:00
name: Build and push mlflow container
2023-11-29 21:24:47 +00:00
on:
push:
2024-01-31 15:27:52 +00:00
tags:
- '[0-9]+.[0-9]+.[0-9]+'
2023-11-29 21:24:47 +00:00
jobs:
build:
2024-01-31 10:58:17 +00:00
name: Build and push mlflow container
2023-11-29 21:24:47 +00:00
runs-on: ubuntu-latest
container: ghcr.io/catthehacker/ubuntu:act-latest@sha256:07466dbbecd8690579d9bcbf8a1214240b91534cf03eed5f222e7fd80131f582
2023-11-29 21:24:47 +00:00
env:
IMAGE_NAME: mlflow
REGISTRY: git.namesny.com
REPO_OWNER: cluster
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: git.namesny.com
username: ${{ gitea.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
run: |
VERSION=$(cat requirements.txt | grep mlflow | cut -d'=' -f3)
2024-01-05 10:55:25 +00:00
TODAY=$(date +'%Y-%m-%d')
docker build -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${VERSION}-${TODAY} -t ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest .
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:${VERSION}-${TODAY}
2024-01-31 15:27:52 +00:00
docker push ${REGISTRY}/${REPO_OWNER}/${IMAGE_NAME}:latest