Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Improve the monorepo workflow (#441)
Dhruv Bhanushali6fb96893b31a
diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.ymlindex 2bfeb9cca..f69a2a254 100644--- a/.github/workflows/ci_cd.yml+++ b/.github/workflows/ci_cd.yml@@ -5,12 +5,11 @@ on:push:branches:- main- - monoreporelease:types:- publishedworkflow_dispatch:- input:+ inputs:image_tag:description: "The tag to assign to the images built in the workflow."type: string@@ -881,9 +880,10 @@ jobs:deploy-frontend:name: Deploy staging frontendruns-on: ubuntu-latest- if: github.event_name == 'push'+ if: github.event_name == 'push' && needs.get-changes.outputs.frontend == 'true'needs:- get-image-tag+ - get-changes- nuxt-build- nuxt-playwright-e2e- nuxt-playwright-vr@@ -906,9 +906,10 @@ jobs:deploy-api:name: Deploy staging APIruns-on: ubuntu-latest- if: github.event_name == 'push'+ if: github.event_name == 'push' && (needs.get-changes.outputs.ingestion_server == 'true' || needs.get-changes.outputs.api == 'true')needs:- get-image-tag+ - get-changes- test-api- publish-imagesdiff --git a/.github/workflows/generate_pot.yml b/.github/workflows/generate_pot.ymlindex 813d11615..d4e68197b 100644--- a/.github/workflows/generate_pot.yml+++ b/.github/workflows/generate_pot.yml@@ -4,7 +4,6 @@ on:push:branches:- main- - monorepoconcurrency:group: ${{ github.workflow }}diff --git a/.github/workflows/sync_meta.yml b/.github/workflows/sync_meta.ymlindex 75a75f3d5..5d6d91b2b 100644--- a/.github/workflows/sync_meta.yml+++ b/.github/workflows/sync_meta.yml@@ -8,7 +8,6 @@ on:push:branches:- main- - monorepojobs:sync_meta:diff --git a/api/justfile b/api/justfileindex 84f43022c..19788ac04 100644--- a/api/justfile+++ b/api/justfile@@ -1,11 +1,13 @@set dotenv-load := false+COLOR := "\\033[0;34m"+NO_COLOR := "\\033[0m"+# Show all available recipes@_default:- echo "#######"- echo "# API #"- echo "#######"- just --list --unsorted+ printf "\n{{ COLOR }}# API (path: \`api/\`)\n"+ printf "===================={{ NO_COLOR }}\n"+ just --list --unsorted# Aliases _all-up from the parent directory@@ -15,7 +17,7 @@ _all-up:# Install dependenciesinstall:- pipenv install --dev+ pipenv install --dev########### Health #diff --git a/automations/js/justfile b/automations/js/justfileindex da493ff67..5519b88df 100644--- a/automations/js/justfile+++ b/automations/js/justfile@@ -1,16 +1,18 @@set dotenv-load := false+COLOR := "\\033[0;31m"+NO_COLOR := "\\033[0m"+# Show all available recipes@_default:- echo "#######################"- echo "# Node.js automations #"- echo "#######################"- just --list --unsorted+ printf "\n{{ COLOR }}# Node.js automations (path: \`automations/js/\`)\n"+ printf "==============================================={{ NO_COLOR }}\n"+ just --list --unsorted# Install dependenciesinstall:- pnpm install+ pnpm install########### Render #diff --git a/automations/python/justfile b/automations/python/justfileindex 1cddd2af3..20948b398 100644--- a/automations/python/justfile+++ b/automations/python/justfile@@ -1,13 +1,15 @@set dotenv-load := false+COLOR := "\\033[0;33m"+NO_COLOR := "\\033[0m"+# Show all available recipes@_default:- echo "######################"- echo "# Python automations #"- echo "######################"- just --list --unsorted+ printf "\n{{ COLOR }}# Python automations (path: \`automations/python/\`)\n"+ printf "=================================================={{ NO_COLOR }}\n"+ just --list --unsorted# Install dependenciesinstall:- pipenv install --dev+ pipenv install --devdiff --git a/frontend/justfile b/frontend/justfileindex bad5dd0c9..cf5dc9f2a 100644--- a/frontend/justfile+++ b/frontend/justfile@@ -1,10 +1,12 @@set dotenv-load := false+COLOR := "\\033[0;32m"+NO_COLOR := "\\033[0m"+# Show all available recipes@_default:- echo "############"- echo "# Frontend #"- echo "############"+ printf "\n{{ COLOR }}# Frontend (path: \`frontend/\`)\n"+ printf "=============================={{ NO_COLOR }}\n"just --list --unsorted# Install dependenciesdiff --git a/ingestion_server/justfile b/ingestion_server/justfileindex c5d19e5c1..d0b0afc98 100644--- a/ingestion_server/justfile+++ b/ingestion_server/justfile@@ -1,11 +1,13 @@set dotenv-load := false+COLOR := "\\033[0;36m"+NO_COLOR := "\\033[0m"+# Show all available recipes@_default:- echo "####################"- echo "# Ingestion server #"- echo "####################"- just --list --unsorted+ printf "\n{{ COLOR }}# Ingestion server (path: \`ingestion_server/\`)\n"+ printf "=============================================={{ NO_COLOR }}\n"+ just --list --unsorted# Install dependenciesdiff --git a/justfile b/justfileindex c8948b817..fd7a9102a 100644--- a/justfile+++ b/justfile@@ -10,12 +10,14 @@ DC_USER := env_var_or_default("DC_USER", "opener")# Show all available recipes, also recurses inside nested justfiles@_default:- just --list --unsorted- cd api && just- cd ingestion_server && just- cd frontend && just- cd automations/python && just- cd automations/js && just+ just --list --unsorted+ cd nginx && just+ cd api && just+ cd ingestion_server && just+ cd frontend && just+ cd automations/python && just+ cd automations/js && just+ printf "\nTo run a nested recipe, add the folder path before it, like \`just frontend/install\`.\n"############ Helpers #diff --git a/nginx/justfile b/nginx/justfileindex 3a7ad7ac8..a3d7e6aa6 100644--- a/nginx/justfile+++ b/nginx/justfile@@ -1,11 +1,13 @@set dotenv-load := false+COLOR := "\\033[0;35m"+NO_COLOR := "\\033[0m"+# Show all available recipes@_default:- echo "#########"- echo "# NGINX #"- echo "#########"- just --list --unsorted+ printf "\n{{ COLOR }}# NGINX (path: \`nginx/\`)\n"+ printf "========================{{ NO_COLOR }}\n"+ just --list --unsorted# Aliases collectstatic from the API directory