Skip to content

Commit

Permalink
H-3624: Fix AI worker github build action (#5696)
Browse files Browse the repository at this point in the history
  • Loading branch information
CiaranMn authored Nov 22, 2024
1 parent 47c108f commit d50031f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/actions/build-docker-images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ inputs:
description: "Build hash-ai-worker-ts image"
required: false
default: "false"
GOOGLE_CLOUD_WORKLOAD_IDENTITY_FEDERATION_CONFIG_JSON:
description: "JSON file containing GCP Identity Federation config, required by the AI worker"
required: false
hash-integration-worker:
description: "Build hash-integration-worker image"
required: false
Expand Down Expand Up @@ -114,6 +117,8 @@ runs:
org.opencontainers.image.source="https://github.com/hashintel/hash"
org.opencontainers.image.licenses="AGPL-3.0-only,"
org.opencontainers.image.description="A TypeScript 'AI' worker for HASH"
build-args: |
GOOGLE_CLOUD_WORKLOAD_IDENTITY_FEDERATION_CONFIG_JSON=${{ inputs.GOOGLE_CLOUD_WORKLOAD_IDENTITY_FEDERATION_CONFIG_JSON }}
- name: Build hash-ai-worker-ts image (fork)
if: inputs.hash-ai-worker-ts == 'true' && github.event.pull_request.head.repo.full_name != github.repository
Expand All @@ -124,6 +129,8 @@ runs:
tags: hash-ai-worker-ts
cache-from: |
type=registry,ref=ghcr.io/hashintel/hash-ai-worker-ts
build-args: |
GOOGLE_CLOUD_WORKLOAD_IDENTITY_FEDERATION_CONFIG_JSON=${{ inputs.google_cloud_workload_identity_federation_config_json }}
- name: Build hash-integration-worker image
if: inputs.hash-integration-worker == 'true' && github.event.pull_request.head.repo.full_name == github.repository
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/hash-backend-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ env:

GH_RUN_ID: ${{ github.run_id }}

GOOGLE_CLOUD_WORKLOAD_IDENTITY_FEDERATION_CONFIG_JSON: ${{ secrets.GOOGLE_CLOUD_WORKLOAD_IDENTITY_FEDERATION_CONFIG_JSON }}

HASH_API_RESOURCE_NAME: ${{ secrets.HASH_API_RESOURCE_NAME }}
HASH_GRAPH_RESOURCE_NAME: ${{ secrets.HASH_GRAPH_RESOURCE_NAME }}
HASH_KRATOS_RESOURCE_NAME: ${{ secrets.HASH_KRATOS_RESOURCE_NAME }}
Expand Down Expand Up @@ -238,6 +240,8 @@ jobs:
AWS_REGION: ${{ env.AWS_REGION }}
AWS_ECR_URL: ${{ env.AWS_ECR_URL }}
IMAGE_NAME: ${{ env.HASH_TEMPORAL_AI_TS_WORKER_RESOURCE_NAME }}
BUILD_ARGS: |
GOOGLE_CLOUD_WORKLOAD_IDENTITY_FEDERATION_CONFIG_JSON: ${{ secrets.GOOGLE_CLOUD_WORKLOAD_IDENTITY_FEDERATION_CONFIG_JSON }}
build-integration-worker:
name: Build and push Temporal integration Worker
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ jobs:
hash-graph: ${{ matrix.package == '@apps/hash-graph' }}
hash-ai-worker-ts: ${{ matrix.package == '@apps/hash-ai-worker-ts' }}
hash-integration-worker: ${{ matrix.package == '@apps/hash-integration-worker' }}
GOOGLE_CLOUD_WORKLOAD_IDENTITY_FEDERATION_CONFIG_JSON: ${{ secrets.GOOGLE_CLOUD_WORKLOAD_IDENTITY_FEDERATION_CONFIG_JSON }}
hash-api: ${{ matrix.package == '@apps/hash-api' }}

integration-tests:
Expand Down

0 comments on commit d50031f

Please sign in to comment.