diff --git a/.gitea/workflows/update.yml b/.gitea/workflows/update.yml new file mode 100644 index 0000000..9115d30 --- /dev/null +++ b/.gitea/workflows/update.yml @@ -0,0 +1,51 @@ +name: Daily Update Pipeline + +on: + schedule: + # Runs every day at 3:00 AM UTC + - cron: '*/2 * * * *' + workflow_dispatch: # Allows manual triggering + +jobs: + build-and-publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ gitea.server_url }} + username: ${{ gitea.actor }} + password: ${{ secrets.CI_RUNNER_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ gitea.server_url }}/${{ gitea.repository }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=schedule,pattern={{date 'YYYYMMDD'}} + type=raw,value=latest,enable={{is_default_branch}} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Update deployment info + run: | + echo "Docker image built and pushed successfully at $(date)" + echo "Image tags: ${{ steps.meta.outputs.tags }}" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d95e70b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM mlflow/mlflow:latest + +RUN pip install psycopg2-binary + +ENTRYPOINT [ "mlflow", "server" ]