{"id":28437183,"url":"https://github.com/bytebase/example-gitops-gitlab-flow","last_synced_at":"2026-02-13T17:32:20.562Z","repository":{"id":282199018,"uuid":"947794782","full_name":"bytebase/example-gitops-gitlab-flow","owner":"bytebase","description":"Database CI/CD and schema migration with GitLab flow using Bytebase and GitHub actions","archived":false,"fork":false,"pushed_at":"2025-03-14T03:36:10.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T19:54:32.323Z","etag":null,"topics":["bytebase","cicd","example","gitops"],"latest_commit_sha":null,"homepage":"","language":null,"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}},"created_at":"2025-03-13T09:05:45.000Z","updated_at":"2025-03-14T07:55:26.000Z","dependencies_parsed_at":"2025-03-13T10:22:56.693Z","dependency_job_id":"d6309229-fc00-4e0b-bcec-6440b362fd10","html_url":"https://github.com/bytebase/example-gitops-gitlab-flow","commit_stats":null,"previous_names":["bytebase/example-gitops-gitlab-flow"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bytebase/example-gitops-gitlab-flow","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-gitops-gitlab-flow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-gitops-gitlab-flow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-gitops-gitlab-flow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-gitops-gitlab-flow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytebase","download_url":"https://codeload.github.com/bytebase/example-gitops-gitlab-flow/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytebase%2Fexample-gitops-gitlab-flow/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29413393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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:09.977Z","updated_at":"2026-02-13T17:32:20.550Z","avatar_url":"https://github.com/bytebase.png","language":null,"readme":"# About\n\nThis repository demonstrates how to use Bytebase and GitHub actions to do database release CI/CD with a code base following [GitLab flow](https://about.gitlab.com/topics/version-control/what-is-gitlab-flow/).\n\nFor GitLab flow, there is one production branch and as many as pre-production branches you want. Each of these branches correspond to an environment and merging into a branch triggers the deployment.\n\nFor this example, there are \"test\" and \"prod\" branches corresponding to the \"test\" and \"prod\" environment.\n\n[sql-review.yml](/.github/workflows/sql-review.yml) checks the SQL migration files against the databases when pull requests are created targeting \"test\" or \"prod\" branch.\n\n[release.yml](/.github/workflows/release.yml) builds the code, migrate the databases and deploy the code when new commits are pushed to \"test\" or \"prod\" branch. Use [environments with protection rules](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment#required-reviewers) to control whether the deployment to an environment requires approval.\n\n## How to configure sql-review.yml\n\nCopy [sql-review.yml](/.github/workflows/sql-review.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_PROJECT: \"projects/project-sample\"\n      BYTEBASE_TARGETS: \"instances/test-sample-instance/databases/hr_test\" # the database targets to check against.\n      FILE_PATTERN: \"migrations/*.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/create-release-action](https://github.com/bytebase/create-release-action/tree/main).\n\n## How to configure release.yml\n\nCopy [release.yml](/.github/workflows/release.yml) to your repository.\n\nModify the environment variables to match your setup.\n\n```yml\n    env:\n      BYTEBASE_URL: https://demo.bytebase.com\n      BYTEBASE_SERVICE_ACCOUNT: ci@service.bytebase.com\n      BYTEBASE_PROJECT: \"projects/project-sample\"\n      BYTEBASE_TARGETS: \"instances/test-sample-instance/databases/hr_test\" # deploy targets\n      FILE_PATTERN: \"migrations/*.sql\" # the glob pattern matching the migration files.\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/create-release-action](https://github.com/bytebase/create-release-action/tree/main).\n\n## Preview\n\nBranches:\n\n- [Test branch](https://github.com/bytebase/example-gitops-gitlab-flow/tree/test)\n- [Prod branch](https://github.com/bytebase/example-gitops-gitlab-flow/tree/prod)\n\nPull requests to the test and prod branch:\n\n- https://github.com/bytebase/example-gitops-gitlab-flow/pull/1\n- https://github.com/bytebase/example-gitops-gitlab-flow/pull/4\n\nGitHub actions that deploy to the test and prod:\n\n- https://github.com/bytebase/example-gitops-gitlab-flow/actions/runs/13831088906\n- https://github.com/bytebase/example-gitops-gitlab-flow/actions/runs/13831106877","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebase%2Fexample-gitops-gitlab-flow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytebase%2Fexample-gitops-gitlab-flow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytebase%2Fexample-gitops-gitlab-flow/lists"}