{"id":28437198,"url":"https://github.com/bytebase/example-gitops-github-flow","last_synced_at":"2026-03-05T11:32:37.407Z","repository":{"id":280773309,"uuid":"942389837","full_name":"bytebase/example-gitops-github-flow","owner":"bytebase","description":"Database CI/CD and schema migration with GitHub flow using Bytebase and GitHub actions","archived":false,"fork":false,"pushed_at":"2025-11-19T07:10:19.000Z","size":75,"stargazers_count":1,"open_issues_count":5,"forks_count":26,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-19T09:05:46.059Z","etag":null,"topics":["bytebase","cicd","example","gitops"],"latest_commit_sha":null,"homepage":"","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bytebase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-04T03:17:50.000Z","updated_at":"2025-11-19T07:10:23.000Z","dependencies_parsed_at":"2025-03-05T08:34:16.706Z","dependency_job_id":"5b1d4120-4a55-4f28-8282-00c8f5d5d47e","html_url":"https://github.com/bytebase/example-gitops-github-flow","commit_stats":null,"previous_names":["bytebase/example-gitops-github-flow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bytebase/example-gitops-github-flow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-gitops-github-flow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-gitops-github-flow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-gitops-github-flow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-gitops-github-flow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytebase","download_url":"https://codeload.github.com/bytebase/example-gitops-github-flow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-gitops-github-flow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30122149,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T11:11:57.947Z","status":"ssl_error","status_checked_at":"2026-03-05T11:11:29.001Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bytebase","cicd","example","gitops"],"created_at":"2025-06-05T23:09:12.200Z","updated_at":"2026-03-05T11:32:37.389Z","avatar_url":"https://github.com/bytebase.png","language":"PLpgSQL","readme":"# About\n\nThis repository demonstrates how to use Bytebase and GitHub actions to do database release CI/CD with a code base following [GitHub flow](https://docs.github.com/en/get-started/using-github/github-flow).\n\nFor GitHub flow, feature branches are merged into the main branch and the main branch is deployed to the, for example, \"test\" and \"prod\" environments in a deploy pipeline.\n\n[sql-review-action.yml](/.github/workflows/sql-review-action.yml) checks the SQL migration files against the databases when pull requests are created.\n\n[release-action.yml](/.github/workflows/release-action.yml) builds the code and then for each environment migrate the databases and deploy the code. Using [environments with protection rules](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment#required-reviewers), it can deploy to the test environment automatically and push to the prod environment after approval.\n\n## Use bytebase/bytebase-action\n\nThe README of bytebase/bytebase-action can be found at [README](https://github.com/bytebase/bytebase/blob/main/action/README.md).\n\n### How to configure sql-review-action.yml\n\nCopy [sql-review-action.yml](/.github/workflows/sql-review-action.yml) to your repository.\n\nModify the environment variables to match your setup.\n\n```yml\n    env:\n      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # set GITHUB_TOKEN because the 'Check release' step needs it to comment the pull request with check results.\n      BYTEBASE_URL: https://demo.bytebase.com\n      BYTEBASE_SERVICE_ACCOUNT: ci@service.bytebase.com\n      BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET}}\n      BYTEBASE_PROJECT: \"projects/project-sample\"\n      BYTEBASE_TARGETS: \"instances/test-sample-instance/databases/hr_test\" # the database targets to check against.\n      FILE_PATTERN: \"migrations-semver/*.sql\" # the glob pattern matching the migration files.\n```\n\nSet your service account password in the repository secrets setting with the name `BYTEBASE_SERVICE_ACCOUNT_SECRET`.\n\n\u003e [!IMPORTANT]\n\u003e The migration filename SHOULD comply to the naming scheme described in [bytebase-action](https://github.com/bytebase/bytebase/tree/main/action#global-flags) `--file-pattern` flag section.\n\n### How to configure release-action.yml\n\nCopy [release-action.yml](/.github/workflows/release-action.yml) to your repository.\n\nModify the environment variables to match your setup.\nYou need to edit both deploy-to-test and deploy-to-prod jobs.\n\n```yml\n    env:\n      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      BYTEBASE_URL: https://demo.bytebase.com\n      BYTEBASE_SERVICE_ACCOUNT: ci@service.bytebase.com\n      BYTEBASE_SERVICE_ACCOUNT_SECRET: ${{secrets.BYTEBASE_SERVICE_ACCOUNT_SECRET}}\n      BYTEBASE_PROJECT: \"projects/project-sample\"\n      # The Bytebase rollout pipeline will deploy to 'test' and 'prod' environments.\n      # 'deploy_to_test' job rollouts the 'test' stage and 'deploy_to_prod' job rollouts the 'prod' stage.\n      BYTEBASE_TARGETS: \"instances/test-sample-instance/databases/hr_test,instances/prod-sample-instance/databases/hr_prod\"\n      BYTEBASE_TARGET_STAGE: environments/test\n      FILE_PATTERN: \"migrations-semver/*.sql\"\n```\n\nIn the repository environments setting, create two environments: \"test\" and \"prod\". In the \"prod\" environment setting, configure \"Deployment protection rules\", check \"Required reviewers\" and add reviewers in order to rollout the \"prod\" environment after approval.\n\nSet your service account password in the repository secrets setting with the name `BYTEBASE_SERVICE_ACCOUNT_SECRET`.\n\n\u003e [!IMPORTANT]\n\u003e The migration filename SHOULD comply to the naming scheme described in [bytebase-action](https://github.com/bytebase/bytebase/tree/main/action#global-flags) `--file-pattern` flag section.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebase%2Fexample-gitops-github-flow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytebase%2Fexample-gitops-github-flow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebase%2Fexample-gitops-github-flow/lists"}