From da8e61f8fbba9fca0389c7ecaa817e1ee33ef7ec Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Sat, 20 Jan 2024 01:00:46 +0000 Subject: [PATCH 1/9] Update python:3.10-slim Docker digest to b64d188 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8f05a07..9eca0d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.10-slim@sha256:669b88d5947f8bc66039e97949099baa52fe6b02b9d6846836667d2c8d9859fe +FROM python:3.10-slim@sha256:b64d1888e5d1ac06ff2c0ad0fd1fe9c2dc5826de2bbe2e5a87ea4b9346edaf1c COPY requirements.txt . RUN pip install -r requirements.txt EXPOSE 5000 From daac3e43479e82f9e2a219cfaa2f3f38432d3a59 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Wed, 31 Jan 2024 01:00:47 +0000 Subject: [PATCH 2/9] Update dependency boto3 to v1.34.31 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index da8d0da..4a2c461 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ mlflow==2.9.2 psycopg2-binary==2.9.9 -boto3==1.34.29 \ No newline at end of file +boto3==1.34.31 \ No newline at end of file From 5d1852677421668b0e442a55f96a4f140fb5130b Mon Sep 17 00:00:00 2001 From: LordMathis Date: Wed, 31 Jan 2024 11:54:43 +0100 Subject: [PATCH 3/9] Add tag workflow --- .gitea/workflows/release.yaml | 4 +--- .gitea/workflows/tag.yaml | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 .gitea/workflows/tag.yaml diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 2a828ca..d4eb807 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -1,8 +1,6 @@ name: Build website container on: - push: - branches: - - main + push: tags jobs: build: diff --git a/.gitea/workflows/tag.yaml b/.gitea/workflows/tag.yaml new file mode 100644 index 0000000..b91b954 --- /dev/null +++ b/.gitea/workflows/tag.yaml @@ -0,0 +1,28 @@ +name: Create mlflow tag +on: + push: + branches: + - main + +jobs: + build: + name: Build image + runs-on: ubuntu-latest + container: ghcr.io/catthehacker/ubuntu:act-latest@sha256:8583ed2b7d097609ff91cc914696324ee945ceb8639967759f4cebbfcb8e63a5 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Get latest git tag + id: tag + run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT + - name: Get mlflow version + id: mlflow + run: echo "mlflow=$(cat requirements.txt | grep mlflow | cut -d'=' -f3)" >> $GITHUB_OUTPUT + - name: Create tag if it doesn't exist + run: | + if [[ $(git tag -l "${{ steps.tag.outputs.tag }}") ]]; then + echo "Tag already exists" + else + git tag ${{ steps.mlflow.outputs.mlflow }} + git push origin ${{ steps.mlflow.outputs.mlflow }} + fi From 7ef590b6aa35dfe34cdd592621c2ce476589729d Mon Sep 17 00:00:00 2001 From: LordMathis Date: Wed, 31 Jan 2024 11:58:17 +0100 Subject: [PATCH 4/9] Fix release workflow trigger --- .gitea/workflows/release.yaml | 8 +++++--- .gitea/workflows/tag.yaml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index d4eb807..3566621 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -1,10 +1,12 @@ -name: Build website container +name: Build and push mlflow container on: - push: tags + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' jobs: build: - name: Build image + name: Build and push mlflow container runs-on: ubuntu-latest container: ghcr.io/catthehacker/ubuntu:act-latest@sha256:8583ed2b7d097609ff91cc914696324ee945ceb8639967759f4cebbfcb8e63a5 env: diff --git a/.gitea/workflows/tag.yaml b/.gitea/workflows/tag.yaml index b91b954..3657bfa 100644 --- a/.gitea/workflows/tag.yaml +++ b/.gitea/workflows/tag.yaml @@ -6,7 +6,7 @@ on: jobs: build: - name: Build image + name: Create mlflow tag runs-on: ubuntu-latest container: ghcr.io/catthehacker/ubuntu:act-latest@sha256:8583ed2b7d097609ff91cc914696324ee945ceb8639967759f4cebbfcb8e63a5 steps: From 53f205cafff51bff03d87377022808126326a8d9 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Wed, 31 Jan 2024 12:04:13 +0100 Subject: [PATCH 5/9] Fetch tags with checkout --- .gitea/workflows/tag.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/tag.yaml b/.gitea/workflows/tag.yaml index 3657bfa..b56d2c6 100644 --- a/.gitea/workflows/tag.yaml +++ b/.gitea/workflows/tag.yaml @@ -12,6 +12,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-tags: true - name: Get latest git tag id: tag run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT From 672f896a6acd7da220822e72b5cdab96eed38234 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Wed, 31 Jan 2024 12:12:28 +0100 Subject: [PATCH 6/9] Fetch tags separately --- .gitea/workflows/tag.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/tag.yaml b/.gitea/workflows/tag.yaml index b56d2c6..fc01f71 100644 --- a/.gitea/workflows/tag.yaml +++ b/.gitea/workflows/tag.yaml @@ -12,8 +12,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - with: - fetch-tags: true + - name: Fetch tags + run: git fetch --tags origin - name: Get latest git tag id: tag run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT From 587d81e6729f096d7df6c2e96a4e8bf4a6ec70f6 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Wed, 31 Jan 2024 12:15:11 +0100 Subject: [PATCH 7/9] Update if statement --- .gitea/workflows/tag.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/tag.yaml b/.gitea/workflows/tag.yaml index fc01f71..6469df8 100644 --- a/.gitea/workflows/tag.yaml +++ b/.gitea/workflows/tag.yaml @@ -22,7 +22,7 @@ jobs: run: echo "mlflow=$(cat requirements.txt | grep mlflow | cut -d'=' -f3)" >> $GITHUB_OUTPUT - name: Create tag if it doesn't exist run: | - if [[ $(git tag -l "${{ steps.tag.outputs.tag }}") ]]; then + if git tag -l "${{ steps.tag.outputs.tag }}"; then echo "Tag already exists" else git tag ${{ steps.mlflow.outputs.mlflow }} From 6e126a60273f45ae83072c32fe3eeb4352cbf16b Mon Sep 17 00:00:00 2001 From: LordMathis Date: Wed, 31 Jan 2024 12:18:27 +0100 Subject: [PATCH 8/9] Automerge digest --- renovate.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/renovate.json b/renovate.json index d131ad9..f643401 100644 --- a/renovate.json +++ b/renovate.json @@ -11,5 +11,8 @@ }, "pin": { "automerge": true + }, + "digest": { + "automerge": true } } From dba48e35995360f7dadb33b95ae981a85a187771 Mon Sep 17 00:00:00 2001 From: LordMathis Date: Wed, 31 Jan 2024 13:38:37 +0100 Subject: [PATCH 9/9] Combine workflows --- .gitea/workflows/release.yaml | 36 +++++++++++++++++++++++++++++++++-- .gitea/workflows/tag.yaml | 30 ----------------------------- 2 files changed, 34 insertions(+), 32 deletions(-) delete mode 100644 .gitea/workflows/tag.yaml diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml index 3566621..67bd2eb 100644 --- a/.gitea/workflows/release.yaml +++ b/.gitea/workflows/release.yaml @@ -1,12 +1,44 @@ name: Build and push mlflow container on: push: - tags: - - '[0-9]+.[0-9]+.[0-9]+' + branches: + - main jobs: + + tag: + name: Create mlflow tag + runs-on: ubuntu-latest + outputs: + tag_created: ${{ steps.create.outputs.created }} + container: ghcr.io/catthehacker/ubuntu:act-latest@sha256:8583ed2b7d097609ff91cc914696324ee945ceb8639967759f4cebbfcb8e63a5 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Fetch tags + run: git fetch --tags origin + - name: Get latest git tag + id: tag + run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT + - name: Get mlflow version + id: mlflow + run: echo "mlflow=$(cat requirements.txt | grep mlflow | cut -d'=' -f3)" >> $GITHUB_OUTPUT + - name: Create tag if it doesn't exist + id: create + run: | + if git tag -l "${{ steps.tag.outputs.tag }}"; then + echo "Tag already exists" + echo "created=false" >> $GITHUB_OUTPUT + else + git tag ${{ steps.mlflow.outputs.mlflow }} + git push origin ${{ steps.mlflow.outputs.mlflow }} + echo "created=true" >> $GITHUB_OUTPUT + fi + build: name: Build and push mlflow container + needs: tag + if: ${{ needs.tag.outputs.tag_created == 'true' }} runs-on: ubuntu-latest container: ghcr.io/catthehacker/ubuntu:act-latest@sha256:8583ed2b7d097609ff91cc914696324ee945ceb8639967759f4cebbfcb8e63a5 env: diff --git a/.gitea/workflows/tag.yaml b/.gitea/workflows/tag.yaml deleted file mode 100644 index 6469df8..0000000 --- a/.gitea/workflows/tag.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: Create mlflow tag -on: - push: - branches: - - main - -jobs: - build: - name: Create mlflow tag - runs-on: ubuntu-latest - container: ghcr.io/catthehacker/ubuntu:act-latest@sha256:8583ed2b7d097609ff91cc914696324ee945ceb8639967759f4cebbfcb8e63a5 - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Fetch tags - run: git fetch --tags origin - - name: Get latest git tag - id: tag - run: echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT - - name: Get mlflow version - id: mlflow - run: echo "mlflow=$(cat requirements.txt | grep mlflow | cut -d'=' -f3)" >> $GITHUB_OUTPUT - - name: Create tag if it doesn't exist - run: | - if git tag -l "${{ steps.tag.outputs.tag }}"; then - echo "Tag already exists" - else - git tag ${{ steps.mlflow.outputs.mlflow }} - git push origin ${{ steps.mlflow.outputs.mlflow }} - fi