Skip to content

Commit

Permalink
Update docker_with_model.yml (#40)
Browse files Browse the repository at this point in the history
* Update docker_with_model.yml

* Update docker_with_model.yml

* Update main.yml

* Update docker.yml

* Update docker_with_model.yml

* Update docker.yml

* Update docker_with_model.yml
  • Loading branch information
guillaume-chervet authored Sep 16, 2024
1 parent 22c04ad commit b9e814d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
packages: write
environment: MLOpsPython
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v2
Expand All @@ -51,7 +51,7 @@ jobs:

- name: Build and push Docker image
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: ${{ inputs.image_context }}
file : ${{ inputs.image_file }}
Expand All @@ -62,7 +62,7 @@ jobs:

- name: Build and push Docker image
if: github.ref != 'refs/heads/main'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: ${{ inputs.image_context }}
file : ${{ inputs.image_file }}
Expand Down
21 changes: 13 additions & 8 deletions .github/workflows/docker_with_model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,22 @@ jobs:
packages: write
environment: MLOpsPython
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v4
- name: Free disk space on Ubuntu runner 🔧
uses: kfir4444/free-disk-space@main
with:
# frees about 6 GB, warning: may remove required tools
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
dotnet: false
haskell: false
large-packages: false
docker-images: false
swap-storage: false

- name: Set up Python 3.11
uses: actions/setup-python@v3
Expand Down Expand Up @@ -115,7 +120,7 @@ jobs:

- name: Build and push Docker image
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: ${{ inputs.image_context }}
file : ${{ inputs.image_file }}
Expand All @@ -126,7 +131,7 @@ jobs:

- name: Build and push Docker image
if: github.ref != 'refs/heads/main'
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: ${{ inputs.image_context }}
file : ${{ inputs.image_file }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter_python
with:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
packages_unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
Expand All @@ -83,7 +83,7 @@ jobs:
train_unit_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
Expand Down Expand Up @@ -127,7 +127,7 @@ jobs:
outputs:
new_version: ${{ steps.tag.outputs.new_version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Bump version and push tag
id: tag_version
if: github.ref == 'refs/heads/main'
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
AZURE_LOCATION: ${{ env.AZURE_LOCATION }}
DOCKER_REGISTRY: ${{ env.DOCKER_REGISTRY }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ env.PYTHON_VERSION }}
Expand Down Expand Up @@ -282,7 +282,7 @@ jobs:
runs-on: ubuntu-latest
needs: [deploy, train]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
Expand Down Expand Up @@ -320,7 +320,7 @@ jobs:
outputs:
DOCKER_WEBAPP_IMAGE_NAME: ${{ env.DOCKER_REPOSITORY }}/${{ env.DOCKER_WEBAPP_IMAGE_NAME }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter_webapp
with:
Expand Down Expand Up @@ -360,7 +360,7 @@ jobs:
needs: [ integration_tests ]
environment: MLOpsPython
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
token: ${{ secrets.GIT_TOKEN }}
fetch-depth: 0
Expand All @@ -375,4 +375,4 @@ jobs:
./bin/generate-changelog.sh "$PROJECT_URL"
git add ./CHANGELOG.md
git commit -m "[skip ci] Generate changelog to version ${{ steps.tag.outputs.new_version }}"
git push -f --set-upstream origin "HEAD:main" --follow-tags
git push -f --set-upstream origin "HEAD:main" --follow-tags

0 comments on commit b9e814d

Please sign in to comment.