-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/feat/v2.0.0' into docs/docs-text…
…cat-tutorial
- Loading branch information
Showing
11 changed files
with
247 additions
and
221 deletions.
There are no files selected for viewing
105 changes: 0 additions & 105 deletions
105
.github/workflows/argilla-server.build-docker-image.yml
This file was deleted.
Oops, something went wrong.
141 changes: 141 additions & 0 deletions
141
.github/workflows/argilla-server.build-docker-images.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
name: Build Argilla server docker images | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
is_release: | ||
description: "True if the images should be built for release" | ||
required: true | ||
type: boolean | ||
|
||
publish_latest: | ||
description: "True if the images should be published as latest" | ||
required: true | ||
type: boolean | ||
|
||
jobs: | ||
build: | ||
name: Build Argilla server docker images | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PDM | ||
uses: pdm-project/setup-pdm@v4 | ||
with: | ||
python-version-file: argilla-server/pyproject.toml | ||
cache-dependency-path: argilla-server/pdm.lock | ||
cache: true | ||
|
||
- name: Read package info | ||
id: package-info | ||
working-directory: argilla-server | ||
run: | | ||
PACKAGE_VERSION=$(pdm show --version) | ||
PACKAGE_NAME=$(pdm show --name) | ||
echo "PACKAGE_NAME=$PACKAGE_NAME" >> $GITHUB_OUTPUT | ||
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_OUTPUT | ||
echo "$PACKAGE_NAME==$PACKAGE_VERSION" | ||
- name: Get Docker image tag from GITHUB_REF | ||
if: ${{ !inputs.is_release }} | ||
id: docker-image-tag-from-ref | ||
uses: ./.github/actions/docker-image-tag-from-ref | ||
|
||
- name: Setup environment variables | ||
run: | | ||
if [[ $IS_RELEASE == true ]]; then | ||
echo "PLATFORMS=linux/amd64,linux/arm64" >> $GITHUB_ENV | ||
echo "IMAGE_TAG=v$PACKAGE_VERSION" >> $GITHUB_ENV | ||
else | ||
echo "PLATFORMS=linux/amd64" >> $GITHUB_ENV | ||
echo "IMAGE_TAG=$DOCKER_IMAGE_TAG" >> $GITHUB_ENV | ||
fi | ||
env: | ||
IS_RELEASE: ${{ inputs.is_release }} | ||
PACKAGE_VERSION: ${{ steps.package-info.outputs.PACKAGE_VERSION }} | ||
DOCKER_IMAGE_TAG: ${{ steps.docker-image-tag-from-ref.outputs.docker-image-tag }} | ||
|
||
- name: Set up QEMU | ||
if: ${{ inputs.is_release }} | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.AR_DOCKER_USERNAME }} | ||
password: ${{ secrets.AR_DOCKER_PASSWORD }} | ||
|
||
- name: Download python package | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: argilla-server | ||
path: argilla-server/docker/server/dist | ||
|
||
- name: Build and push `argilla-server` image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: argilla-server/docker/server | ||
file: argilla-server/docker/server/Dockerfile | ||
platforms: ${{ env.PLATFORMS }} | ||
tags: argilla/argilla-server:${{ env.IMAGE_TAG }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: true | ||
|
||
- name: Push latest `argilla-server` image | ||
if: ${{ inputs.is_release && inputs.publish_latest }} | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: argilla-server/docker/server | ||
file: argilla-server/docker/server/Dockerfile | ||
platforms: ${{ env.PLATFORMS }} | ||
tags: argilla/argilla-server:latest | ||
labels: ${{ steps.meta.outputs.labels }} | ||
push: true | ||
|
||
- name: Build and push `argilla-quickstart` image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: argilla-server/docker/quickstart | ||
file: argilla-server/docker/quickstart/Dockerfile | ||
platforms: ${{ env.PLATFORMS }} | ||
tags: argilla/argilla-quickstart:${{ env.IMAGE_TAG }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
ARGILLA_VERSION=${{ env.IMAGE_TAG }} | ||
push: true | ||
|
||
- name: Push latest `argilla-quickstart` image | ||
if: ${{ inputs.is_release && inputs.publish_latest }} | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: argilla-server/docker/quickstart | ||
file: argilla-server/docker/quickstart/Dockerfile | ||
platforms: ${{ env.PLATFORMS }} | ||
tags: argilla/argilla-quickstart:latest | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
ARGILLA_VERSION=${{ env.IMAGE_TAG }} | ||
push: true | ||
|
||
- name: Docker Hub Description for `argilla-server` | ||
uses: peter-evans/dockerhub-description@v4 | ||
if: ${{ inputs.is_release && inputs.publish_latest }} | ||
with: | ||
username: ${{ secrets.AR_DOCKER_USERNAME }} | ||
password: ${{ secrets.AR_DOCKER_PASSWORD }} | ||
repository: argilla/argilla-server | ||
readme-filepath: argilla-server/README.md | ||
|
||
- name: Docker Hub Description for `argilla-quickstart` | ||
uses: peter-evans/dockerhub-description@v4 | ||
if: ${{ inputs.is_release && inputs.publish_latest }} | ||
with: | ||
username: ${{ secrets.AR_DOCKER_USERNAME }} | ||
password: ${{ secrets.AR_DOCKER_PASSWORD }} | ||
repository: argilla/argilla-quickstart | ||
readme-filepath: argilla-server/docker/quickstart/README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.