Skip to content

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

fix: action filename split by underscore (#15949)

p0ny1143c83c238a
diff --git a/action/README.md b/action/README.md
index 2aa848bc2b..bb964611a3 100644
--- a/action/README.md
+++ b/action/README.md
@@ -2,25 +2,25 @@
`bytebase-action` helps to do common chores in database CI/CD with Bytebase.
-# Inputs
+## Inputs
This action requires the following inputs, configured as environment variables:
-## Environment Variables
+### Environment Variables
-- **`BYTEBASE_URL`**: The Bytebase instance URL.
+- **`BYTEBASE_URL`**: The Bytebase instance URL.
-- **`BYTEBASE_SERVICE_ACCOUNT`**: The service account email.
+- **`BYTEBASE_SERVICE_ACCOUNT`**: The service account email.
-- **`BYTEBASE_SERVICE_ACCOUNT_SECRET`**: The service account password.
+- **`BYTEBASE_SERVICE_ACCOUNT_SECRET`**: The service account password.
-- **`BYTEBASE_PROJECT`**: The target Bytebase project name.
- * Format: `projects/{project}`
+- **`BYTEBASE_PROJECT`**: The target Bytebase project name.
+ - Format: `projects/{project}`
-- **`BYTEBASE_TARGETS`**: A comma-separated string listing the target databases or database groups.
- * Can specify a database group or individual databases.
- * Formats:
- * Database: `instances/{instance}/databases/{database}`
- * Database Group: `projects/{project}/databaseGroups/{databaseGroup}`
+- **`BYTEBASE_TARGETS`**: A comma-separated string listing the target databases or database groups.
+ - Can specify a database group or individual databases.
+ - Formats:
+ - Database: `instances/{instance}/databases/{database}`
+ - Database Group: `projects/{project}/databaseGroups/{databaseGroup}`
-- **`FILE_PATTERN`**: A pattern used to glob SQL migration files.
\ No newline at end of file
+- **`FILE_PATTERN`**: A pattern used to glob SQL migration files.
diff --git a/action/file.go b/action/file.go
index 106a16b82d..a9ddabd80c 100644
--- a/action/file.go
+++ b/action/file.go
@@ -29,7 +29,7 @@ func getReleaseFiles(pattern string) ([]*v1pb.Release_File, error) {
t = v1pb.Release_File_DDL_GHOST
}
version := ""
- fields := strings.Fields(base)
+ fields := strings.Split(base, "_")
if len(fields) > 0 {
version = fields[0]
}