Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Versioning model builds #79

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions .github/workflows/upload-bentoml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:

# We cannot tag it as anything other than latest because
# ersilia cli only looks for the 'latest' tag
- name: Build only AMD64 Image for Testing
- name: Build only AMD64 Image for Testing
id: buildForTest
uses: docker/build-push-action@v5
with:
Expand Down Expand Up @@ -113,16 +113,50 @@ jobs:
fi
rm output.csv

# If test failed, we tag the image as dev
- name: Tag Dev image
id: tagDevImage
if: steps.testBuiltImage.outcome == 'failure'
run: |
docker tag ersiliaos/${{ github.event.repository.name }}:latest ersiliaos/${{ github.event.repository.name }}:dev
docker push ersiliaos/${{ github.event.repository.name }}:dev

- name: Create a Test issue
if: steps.testBuiltImage.outcome == 'failure'
uses: actions-ecosystem/action-create-issue@b63bc2bbacb6a838dfe4a9f70da6665ae0962a49
id: createFailureIssue
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
title: Failed model build
body: |
The model build failed. Please check the logs and fix the issue.
A dev image has been pushed to DockerHub for reference.
labels: |
bug

# If test succeeds we tag the image with timestamp and latest
- name: Get date
id: getDate
env:
DATE: ${{ github.run_started_at }}
run: |
# Keep only the date part
DATE=$(echo $DATE | cut -d 'T' -f 1)
echo "::set-output name=DATE::$DATE"

- name: Build and push
id: buildMultiple
if: steps.testBuiltImage.outcome == 'success'
continue-on-error: true
uses: docker/[email protected]
timeout-minutes: 45
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ersiliaos/${{ github.event.repository.name }}:latest
tags: |
ersiliaos/${{ github.event.repository.name }}:latest
ersiliaos/${{ github.event.repository.name }}:${{ steps.getDate.outputs.DATE }}

- name: Set build failure output
id: buildCheck
Expand Down
38 changes: 36 additions & 2 deletions .github/workflows/upload-ersilia-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,50 @@ jobs:
fi
rm output.csv

# If test failed, we tag the image as dev
- name: Tag Dev image
id: tagDevImage
if: steps.testBuiltImageErsiliaPack.outcome == 'failure'
run: |
docker tag ersiliaos/${{ github.event.repository.name }}:latest ersiliaos/${{ github.event.repository.name }}:dev
docker push ersiliaos/${{ github.event.repository.name }}:dev

- name: Create a Test issue
if: steps.testBuiltImageErsiliaPack.outcome == 'failure'
uses: actions-ecosystem/action-create-issue@b63bc2bbacb6a838dfe4a9f70da6665ae0962a49
id: createFailureIssue
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
title: Failed model build
body: |
The model build failed. Please check the logs and fix the issue.
A dev image has been pushed to DockerHub for reference.
labels: |
bug

# If test succeeds we tag the image with timestamp and latest
- name: Get date
id: getDate
env:
DATE: ${{ github.run_started_at }}
run: |
# Keep only the date part
DATE=$(echo $DATE | cut -d 'T' -f 1)
echo "::set-output name=DATE::$DATE"

- name: Build and push
id: buildMultiple
if: steps.testBuiltImageErsiliaPack.outcome == 'success'
continue-on-error: true
uses: docker/[email protected]
timeout-minutes: 45
with:
context: ../
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ersiliaos/${{ github.event.repository.name }}:latest
tags: |
ersiliaos/${{ github.event.repository.name }}:latest
ersiliaos/${{ github.event.repository.name }}:${{ steps.getDate.outputs.DATE }}

- name: Set build failure output
id: buildCheck
Expand Down
Loading