Skip to content

Commit

Permalink
Merge branch 'dev' into feat/lido-integration
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomariscal committed Sep 21, 2023
2 parents 1ff9ece + 7ee1d25 commit 58a8e2f
Show file tree
Hide file tree
Showing 24 changed files with 1,234 additions and 267 deletions.
36 changes: 12 additions & 24 deletions .github/workflows/check-update-widget-index.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: Check and update widget index

on:
workflow_run:
workflows: [Check widget translation]
types: [completed]
push:
branches: [master, dev]

jobs:
main:
name: Check and update widget index
runs-on: ${{ matrix.os }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
timeout-minutes: 15
strategy:
fail-fast: false
Expand All @@ -27,6 +24,13 @@ jobs:
with:
path: backend

- name: Extract branch name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Show branch name
run: echo "Branch name is ${{ steps.extract_branch.outputs.branch }}"

- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
Expand Down Expand Up @@ -58,25 +62,9 @@ jobs:
echo "SERVER_HOST=" >> "$GITHUB_ENV"
echo "SERVER_ORIGINS=" >> "$GITHUB_ENV"
echo "SERVER_SECRET_KEY=" >> "$GITHUB_ENV"
if [[ ${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}} == 'master' ]]; then
echo "ENV_TAG=prod" >> "$GITHUB_ENV"
else
echo "ENV_TAG=dev" >> "$GITHUB_ENV"
echo "WEAVIATE_URL=${{ secrets.DEV_WEAVIATE_URL }}" >> "$GITHUB_ENV"
echo "WEAVIATE_API_KEY=" >> "$GITHUB_ENV"
echo "CHATDB_URL=${{ secrets.DEV_CHATDB_URL }}" >> "$GITHUB_ENV"
fi
- name: Set environment for branch
run: |
echo "SERVER_HOST=" >> "$GITHUB_ENV"
echo "SERVER_ORIGINS=" >> "$GITHUB_ENV"
echo "SERVER_SECRET_KEY=" >> "$GITHUB_ENV"
echo "CHATDB_URL=" >> "$GITHUB_ENV"
echo "WEAVIATE_URL=${{ secrets.WEAVIATE_URL }}" >> "$GITHUB_ENV"
if [[ ${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}} == 'master' ]]; then
if [[ ${{ steps.extract_branch.outputs.branch }} == 'master' ]]; then
echo "ENV_TAG=prod" >> "$GITHUB_ENV"
echo "WEAVIATE_API_KEY=${{ secrets.PROD_WEAVIATE_API_KEY }}" >> "$GITHUB_ENV"
echo "CHATDB_URL=${{ secrets.PROD_CHATDB_URL }}" >> "$GITHUB_ENV"
Expand All @@ -91,10 +79,10 @@ jobs:
- name: Check and update widget index
run: |
GCP_SSH_CMD="gcloud compute ssh cacti-bastion-server --zone us-east1-b --ssh-key-file /tmp/gcp/google_compute_engine --quiet --tunnel-through-iap --ssh-flag"
if [[ ${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}} == 'master' ]]; then
$GCP_SSH_CMD '-vvv -fN -L 8080:${{ secrets.PROD_WEAVIATE_INTERNAL_IP }}'
if [[ ${{ steps.extract_branch.outputs.branch }} == 'master' ]]; then
$GCP_SSH_CMD '-fN -L 8080:${{ secrets.PROD_WEAVIATE_INTERNAL_IP }}'
else
$GCP_SSH_CMD '-vvv -fN -L 8080:${{ secrets.DEV_WEAVIATE_INTERNAL_IP }}'
$GCP_SSH_CMD '-fN -L 8080:${{ secrets.DEV_WEAVIATE_INTERNAL_IP }}'
fi
cd backend
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/check-widget-translation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ jobs:
with:
path: backend

- name: Extract branch name
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch

- name: Show branch name
run: echo "Branch name is ${{ steps.extract_branch.outputs.branch }}"

- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
Expand Down Expand Up @@ -63,7 +70,7 @@ jobs:
echo "CHATDB_URL=" >> "$GITHUB_ENV"
echo "WEAVIATE_URL=${{ secrets.WEAVIATE_URL }}" >> "$GITHUB_ENV"
if [[ ${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}} == 'master' ]]; then
if [[ ${{ steps.extract_branch.outputs.branch }} == 'master' ]]; then
echo "ENV_TAG=prod" >> "$GITHUB_ENV"
echo "WEAVIATE_API_KEY=${{ secrets.PROD_WEAVIATE_API_KEY }}" >> "$GITHUB_ENV"
echo "CHATDB_URL=${{ secrets.PROD_CHATDB_URL }}" >> "$GITHUB_ENV"
Expand All @@ -76,10 +83,10 @@ jobs:
- name: Check widget translation
run: |
GCP_SSH_CMD="gcloud compute ssh cacti-bastion-server --zone us-east1-b --ssh-key-file /tmp/gcp/google_compute_engine --quiet --tunnel-through-iap --ssh-flag"
if [[ ${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}} == 'master' ]]; then
$GCP_SSH_CMD '-vvv -fN -L 8080:${{ secrets.PROD_WEAVIATE_INTERNAL_IP }}'
if [[ ${{ steps.extract_branch.outputs.branch }} == 'master' ]]; then
$GCP_SSH_CMD '-fN -L 8080:${{ secrets.PROD_WEAVIATE_INTERNAL_IP }}'
else
$GCP_SSH_CMD '-vvv -fN -L 8080:${{ secrets.DEV_WEAVIATE_INTERNAL_IP }}'
$GCP_SSH_CMD '-fN -L 8080:${{ secrets.DEV_WEAVIATE_INTERNAL_IP }}'
fi
cd backend
Expand Down
Loading

0 comments on commit 58a8e2f

Please sign in to comment.