Skip to content

Automate library sync when new version is pushed#300

Open
prestoncabe wants to merge 1 commit intomainfrom
automate-library-api-release-steps
Open

Automate library sync when new version is pushed#300
prestoncabe wants to merge 1 commit intomainfrom
automate-library-api-release-steps

Conversation

@prestoncabe
Copy link
Collaborator

git push origin library-api-vX.X.X

deploy — builds library-api, pushes Docker image, deploys to Cloud Run
— waits until new revision is healthy

sync-metadata — calls load-library-metadata.yml (workflow_call)
├─ sync — fetches OpenAPI spec, uploads check metadata to Firebase Storage/Firestore
└─ restart — redeploys builder-api:latest to Cloud Run (no rebuild, ~30-60s)
— new revision starts, @PostConstruct reads updated metadata

Manual trigger (workflow_dispatch) also runs both sync + restart automatically.

git push origin library-api-vX.X.X
         ↓
deploy          — builds library-api, pushes Docker image, deploys to Cloud Run
                — waits until new revision is healthy
         ↓
sync-metadata   — calls load-library-metadata.yml (workflow_call)
  ├─ sync       — fetches OpenAPI spec, uploads check metadata to Firebase Storage/Firestore
  └─ restart    — redeploys builder-api:latest to Cloud Run (no rebuild, ~30-60s)
                — new revision starts, @PostConstruct reads updated metadata

Manual trigger (workflow_dispatch) also runs both sync + restart automatically.
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2

- name: Restart builder-api with updated library metadata
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep things consistent, we may want to use the same step from line 82 of deploy-builder-api.yml here. That step allows for configuring of API_NAME and REGION.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great point, I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants