-
Notifications
You must be signed in to change notification settings - Fork 21
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
[v0.11] Adapt qpext workflow for OpenDataHub #68
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
# Publish `master` as Docker `latest` image. | ||
branches: | ||
- master | ||
- release-* | ||
|
||
# Publish `v1.2.3` tags as releases. | ||
tags: | ||
|
@@ -14,7 +15,7 @@ on: | |
pull_request: | ||
|
||
env: | ||
IMAGE_NAME: qpext | ||
IMAGE_NAME: kserve-qpext | ||
|
||
jobs: | ||
# Run tests. | ||
|
@@ -53,15 +54,16 @@ jobs: | |
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DockerHub | ||
- name: Login to Quay | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USER }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USER }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
|
||
- name: export version variable | ||
run: | | ||
IMAGE_ID=kserve/$IMAGE_NAME | ||
IMAGE_ID=quay.io/${{ vars.QUAY_OWNER }}/$IMAGE_NAME | ||
|
||
# Change all uppercase to lowercase | ||
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') | ||
|
@@ -74,9 +76,14 @@ jobs: | |
|
||
# Use Docker `latest` tag convention | ||
[ "$VERSION" == "master" ] && VERSION=latest | ||
[[ "$VERSION" =~ ^release- ]] && VERSION=$(echo $VERSION | sed 's/^release-//')-latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so 0.11 release branch will use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes.
Would it be useful? I don't see a reason for accumulating images. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The image manifest on quay should include git ref if we don't include it in the image tag itself, but it's definitely easier for lookup purposes to do commit sha There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The If we strictly want a git-ref, I can create both the git-ref tag and the docker-friendly tag: But, then, I'm still not sure about the tag carrying the SHA, as that would mean accumulating images. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm still thinking on the tag with the SHA. Do we really need it? Being ODH, I don't see a hard req for it. |
||
|
||
echo VERSION=$VERSION >> $GITHUB_ENV | ||
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_ENV | ||
TAGS=$IMAGE_ID:$VERSION | ||
|
||
# If a vX.Y.Z release is being built, also update the vX.Y tag. | ||
[[ "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && TAGS=$TAGS,$IMAGE_ID:$(echo $VERSION | sed 's/\(.*\)\.[[:digit:]]\+$/\1/') | ||
|
||
echo CONTAINER_TAGS=$TAGS >> $GITHUB_ENV | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
|
@@ -85,4 +92,4 @@ jobs: | |
context: "{{defaultContext}}:qpext" | ||
file: qpext.Dockerfile | ||
push: true | ||
tags: ${{ env.IMAGE_ID }}:${{ env.VERSION }} | ||
tags: ${{ env.CONTAINER_TAGS }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this still needed? This PR is for the release branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not needed here. Although, I think, it also doesn't hurt.
If it is noisy, I can remove it.