Skip to content

Commit

Permalink
Merge pull request #48 from ecmwf-projects/build-cim-branch
Browse files Browse the repository at this point in the history
Build cim branch
  • Loading branch information
pelusanchez authored May 9, 2024
2 parents 2e4bb55 + bfb1098 commit 8dd9e79
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build-cim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ name: Build cim-ui image
on:
workflow_dispatch:
inputs:
deployment_branch:
description: 'Deployment branch'
required: true
default: 'main'
image_tag:
description: 'Image tag'
required: true
Expand Down Expand Up @@ -54,13 +58,15 @@ jobs:
uses: actions/checkout@v3
with:
repository: ecmwf-projects/cads-cim-api
ref: ${{ inputs.deployment_branch }}
token: ${{ secrets.CADS_PAT }}
path: cads-cim-api

- name: Checkout cads-cim-ui repo
uses: actions/checkout@v3
with:
repository: ecmwf-projects/cads-cim-ui
ref: ${{ inputs.deployment_branch }}
token: ${{ secrets.CADS_PAT }}
path: cads-cim-ui

Expand All @@ -70,7 +76,7 @@ jobs:
with:
context: cads-cim-api
push: true
tags: ${{ secrets.HARBOR_IP }}/cads/cads-backoffice-deployment/cads-cim-api:latest # We always push the latest tag for the backend
tags: ${{ secrets.HARBOR_IP }}/cads/cads-backoffice-deployment/cads-cim-api:${{ github.event.inputs.image_tag }}
file: cads-cim-api/Dockerfile

- name: Build UI and push
Expand All @@ -79,6 +85,8 @@ jobs:
with:
context: cads-cim-ui
push: true
# Arguments for using the cads-cim-api image in the cads-cim-ui build
build-args: CIM_API_IMAGE=${{ secrets.HARBOR_IP }}/cads/cads-backoffice-deployment/cads-cim-api:${{ github.event.inputs.image_tag }}
pull: true # We need to pull the backend image to build the frontend
tags: ${{ secrets.HARBOR_IP }}/cads/cads-backoffice-deployment/cads-cim-ui:${{ github.event.inputs.image_tag }}
file: cads-cim-ui/Dockerfile

0 comments on commit 8dd9e79

Please sign in to comment.