Compare commits

..
2 Commits
2 changed files with 14 additions and 9 deletions
+14 -5
View File
@@ -69,7 +69,9 @@ jobs:
exit 1
fi
# Fetch the configuration blob to get labels
CONFIG_BLOB=$(curl -s "http://gitea.gt-proj.com/v2/brian/mlflow-full/blobs/$CONFIG_DIGEST" 2>/dev/null || echo "{}")
CONFIG_BLOB=$(curl -s \
-H "Authorization: Bearer $REGISTRY_TOKEN" \
"https://gitea.gt-proj.com/v2/brian/mlflow-full/blobs/$CONFIG_DIGEST" 2>/dev/null || echo "{}")
if [ "$CONFIG_BLOB" == "{}" ]; then
echo "success=false" >> $GITHUB_OUTPUT
echo "Failed to fetch config blob"
@@ -138,7 +140,9 @@ jobs:
fi
build-and-publish:
if: needs.decide-to-build.outputs.should_build == 'true'
needs: decide-to-build
needs:
- get-mlflow-digest
- decide-to-build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
@@ -170,7 +174,14 @@ jobs:
type=schedule,pattern={{date 'YYYYMMDD'}}
type=raw,value=latest
labels: |
base-image.digest=${{ needs.check-images.outputs.base_image_digest }}
org.opencontainers.image.title=mlflow-full
org.opencontainers.image.description=MLflow with PostgreSQL support
org.opencontainers.image.authors=Brian Jensen
org.opencontainers.image.vendor=Brian Jensen
org.opencontainers.image.licenses=Apache-2.0
org.opencontainers.image.base.name=ghcr.io/mlflow/mlflow:latest
org.opencontainers.image.base.digest=${{ needs.get-mlflow-digest.outputs.digest }}
maintainer=Brian Jensen
- name: Build and push Docker image
id: build-publish
uses: docker/build-push-action@v5
@@ -181,8 +192,6 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BASE_IMAGE_DIGEST=${{ needs.check-images.outputs.base_image_digest }}
- name: Update deployment info
run: |
echo "Docker image built and pushed successfully at $(date)"
-4
View File
@@ -1,9 +1,5 @@
FROM ghcr.io/mlflow/mlflow:latest
# Set a labels for traceability
LABEL build-date="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
maintainer="Brian Jensen"
# Use --no-cache-dir to avoid storing pip cache in the image
RUN pip install --no-cache-dir \
psycopg2-binary