fix: the configuration file path is not being detected when it is enclosed in quotes

This commit is contained in:
2025-01-12 07:58:32 +01:00
parent 1b60ca6fd2
commit 2c3f2f4a46
3 changed files with 6 additions and 4 deletions

View File

@@ -1,7 +1,7 @@
name: Build
on:
push:
branches: ['develop']
branches: ['nightly']
env:
BUILDKIT_IMAGE: jkaninda/mysql-bkup
jobs:
@@ -28,7 +28,7 @@ jobs:
file: "./Dockerfile"
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: |
appVersion=develop-${{ github.sha }}
appVersion=nightly
tags: |
"${{vars.BUILDKIT_IMAGE}}:develop-${{ github.sha }}"
"${{vars.BUILDKIT_IMAGE}}:nightly"

View File

@@ -129,7 +129,7 @@ func BackupTask(db *dbConfig, config *BackupConfig) {
}
}
func startMultiBackup(bkConfig *BackupConfig, configFile string) {
utils.Info("Starting backup task...")
utils.Info("Starting Multi backup task...")
conf, err := readConf(configFile)
if err != nil {
utils.Fatal("Error reading config file: %s", err)

View File

@@ -155,6 +155,8 @@ func readConf(configFile string) (*Config, error) {
// checkConfigFile checks config files and returns one config file
func checkConfigFile(filePath string) (string, error) {
// Remove the quotes
filePath = strings.Trim(filePath, `"`)
// Define possible config file names
configFiles := []string{filepath.Join(workingDir, "config.yaml"), filepath.Join(workingDir, "config.yml"), filePath}