Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

ci: run cloud rollout Mon-Fri and split runner VM start into its own workflow (#20439)

Danny Xu5193a1427f51
diff --git a/.github/workflows/build-push-cloud-image.yml b/.github/workflows/build-push-cloud-image.yml
index 2d4d8edbcc..b0fec18732 100644
--- a/.github/workflows/build-push-cloud-image.yml
+++ b/.github/workflows/build-push-cloud-image.yml
@@ -3,8 +3,9 @@ name: Deploy Bytebase Cloud
on:
workflow_dispatch:
schedule:
- # Monday-Thursday at 00:00 UTC
- - cron: "0 0 * * 1-4"
+ # Monday-Friday at 00:23 UTC. The off-the-hour minute avoids GitHub Actions'
+ # hour-boundary high-load window, where scheduled jobs can be delayed or dropped.
+ - cron: "23 0 * * 1-5"
permissions:
contents: read
diff --git a/.github/workflows/start-runner-vm.yml b/.github/workflows/start-runner-vm.yml
new file mode 100644
index 0000000000..4f94121a15
--- /dev/null
+++ b/.github/workflows/start-runner-vm.yml
@@ -0,0 +1,35 @@
+# Starts the github-runner GCE VM, which hosts this repo's self-hosted Actions
+# runner (used by jobs with `runs-on: self-hosted`, e.g. backend-tests,
+# golangci-lint, test_link).
+name: Start github-runner VM
+
+on:
+ workflow_dispatch:
+ schedule:
+ # Three times a day, at 21:00, 02:00 and 06:00 UTC.
+ - cron: "0 2,6,21 * * *"
+
+permissions:
+ contents: read
+
+jobs:
+ start-vm:
+ runs-on: ubuntu-24.04
+ steps:
+ - name: Authenticate to Google Cloud
+ uses: google-github-actions/auth@v3
+ with:
+ credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
+
+ - name: Set up Cloud SDK
+ uses: google-github-actions/setup-gcloud@v3
+
+ - name: Start github-runner VM if stopped
+ run: |
+ STATUS=$(gcloud compute instances describe github-runner \
+ --zone southamerica-east1-b --project bytebase-dev \
+ --format='value(status)')
+ if [ "$STATUS" != "RUNNING" ]; then
+ gcloud compute instances start github-runner \
+ --zone southamerica-east1-b --project bytebase-dev
+ fi
diff --git a/.github/workflows/trigger-oncall-sync.yml b/.github/workflows/trigger-oncall-sync.yml
index dedc865704..e14de3c1cc 100644
--- a/.github/workflows/trigger-oncall-sync.yml
+++ b/.github/workflows/trigger-oncall-sync.yml
@@ -16,24 +16,6 @@ jobs:
dispatch:
runs-on: ubuntu-24.04
steps:
- - name: Authenticate to Google Cloud
- uses: google-github-actions/auth@v3
- with:
- credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
-
- - name: Set up Cloud SDK
- uses: google-github-actions/setup-gcloud@v3
-
- - name: Start github-runner VM if stopped
- run: |
- STATUS=$(gcloud compute instances describe github-runner \
- --zone southamerica-east1-b --project bytebase-dev \
- --format='value(status)')
- if [ "$STATUS" != "RUNNING" ]; then
- gcloud compute instances start github-runner \
- --zone southamerica-east1-b --project bytebase-dev
- fi
-
- name: Trigger sync-oncall workflow on bytebase/oncall
env:
GH_TOKEN: ${{ secrets.GHA_DISPATCH_TOKEN }}