Skip to content
This repository has been archived by the owner on Jun 14, 2024. It is now read-only.

Commit

Permalink
feat: enable build_server_docker_image workflow job
Browse files Browse the repository at this point in the history
  • Loading branch information
jfcalvo committed Jan 24, 2024
1 parent e2595a3 commit 77f5779
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
29 changes: 14 additions & 15 deletions .github/workflows/build-push-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
build:
name: Build Docker image
runs-on: ubuntu-latest

# Grant permissions to `GITHUB_TOKEN` for Google Cloud Workload Identity Provider
permissions:
contents: read
Expand Down Expand Up @@ -91,20 +90,20 @@ jobs:
password: ${{ secrets.AR_DOCKER_PASSWORD }}

# Authenticate in GCP using Workload Identity Federation, so we can push the Docker image to the Google Cloud Artifact Registry
- name: Authenticate to Google Cloud
id: google-auth
uses: 'google-github-actions/auth@v1'
with:
token_format: access_token
workload_identity_provider: ${{ secrets.GOOGLE_CLOUD_WIP }}
service_account: ${{ secrets.GOOGLE_CLOUD_SERVICE_ACCOUNT }}

- name: Login to Google Artifact Registry
uses: docker/login-action@v2
with:
registry: europe-docker.pkg.dev
username: oauth2accesstoken
password: ${{ steps.google-auth.outputs.access_token }}
# - name: Authenticate to Google Cloud
# id: google-auth
# uses: 'google-github-actions/auth@v1'
# with:
# token_format: access_token
# workload_identity_provider: ${{ secrets.GOOGLE_CLOUD_WIP }}
# service_account: ${{ secrets.GOOGLE_CLOUD_SERVICE_ACCOUNT }}

# - name: Login to Google Artifact Registry
# uses: docker/login-action@v2
# with:
# registry: europe-docker.pkg.dev
# username: oauth2accesstoken
# password: ${{ steps.google-auth.outputs.access_token }}

- name: Build and push
uses: docker/build-push-action@v4
Expand Down
41 changes: 21 additions & 20 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,24 +129,24 @@ jobs:
if: needs.deployable_check.outputs.isDeployable == 'true'
secrets: inherit

# build_server_docker_image:
# name: Build Argilla server docker image
# uses: ./.github/workflows/build-push-docker.yml
# needs:
# - build_python_package
# - run_unit_tests
# if: |
# !cancelled() &&
# needs.build_python_package.result == 'success' &&
# !contains(needs.*.result, 'failure') &&
# !contains(needs.*.result, 'cancelled')
# with:
# download-python-package: true
# image-name: argilla/argilla-server
# dockerfile: docker/Dockerfile
# readme: README.md
# platforms: linux/amd64,linux/arm64
# secrets: inherit
build_server_docker_image:
name: Build Argilla server docker image
uses: ./.github/workflows/build-push-docker.yml
needs:
- build_python_package
- run_unit_tests
if: |
!cancelled() &&
needs.build_python_package.result == 'success' &&
!contains(needs.*.result, 'failure') &&
!contains(needs.*.result, 'cancelled')
with:
download-python-package: true
image-name: argilla/argilla-server
dockerfile: docker/Dockerfile
readme: README.md
platforms: linux/amd64,linux/arm64
secrets: inherit

# build_quickstart_docker_image:
# name: Build Argilla quickstart docker image
Expand Down Expand Up @@ -194,6 +194,7 @@ jobs:
# run:
# shell: bash -l {0}
# steps:
# # TODO: Git checkout argilla submodule to use specific tag
# - name: Checkout Code 🛎
# uses: actions/checkout@v3
# with:
Expand All @@ -211,5 +212,5 @@ jobs:
# run: pdm publish --no-build --repository testpypi
# - name: Test Installing 🍿
# run: pip install --index-url https://test.pypi.org/simple --no-deps argilla-server==${GITHUB_REF#refs/*/v}
# - name: Publish Package to PyPI 🥩
# run: pdm publish --no-build
# # - name: Publish Package to PyPI 🥩
# # run: pdm publish --no-build

0 comments on commit 77f5779

Please sign in to comment.