mirror of
https://github.com/jkaninda/mysql-bkup.git
synced 2025-12-06 13:39:41 +01:00
Merge pull request #160 from jkaninda/nightly
fix: the configuration file path is not being detected when it is enc…
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
name: Build
|
name: Build
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ['develop']
|
branches: ['nightly']
|
||||||
env:
|
env:
|
||||||
BUILDKIT_IMAGE: jkaninda/mysql-bkup
|
BUILDKIT_IMAGE: jkaninda/mysql-bkup
|
||||||
jobs:
|
jobs:
|
||||||
@@ -28,7 +28,7 @@ jobs:
|
|||||||
file: "./Dockerfile"
|
file: "./Dockerfile"
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
build-args: |
|
build-args: |
|
||||||
appVersion=develop-${{ github.sha }}
|
appVersion=nightly
|
||||||
tags: |
|
tags: |
|
||||||
"${{vars.BUILDKIT_IMAGE}}:develop-${{ github.sha }}"
|
"${{vars.BUILDKIT_IMAGE}}:nightly"
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ func BackupTask(db *dbConfig, config *BackupConfig) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
func startMultiBackup(bkConfig *BackupConfig, configFile string) {
|
func startMultiBackup(bkConfig *BackupConfig, configFile string) {
|
||||||
utils.Info("Starting backup task...")
|
utils.Info("Starting Multi backup task...")
|
||||||
conf, err := readConf(configFile)
|
conf, err := readConf(configFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Fatal("Error reading config file: %s", err)
|
utils.Fatal("Error reading config file: %s", err)
|
||||||
|
|||||||
@@ -155,6 +155,8 @@ func readConf(configFile string) (*Config, error) {
|
|||||||
|
|
||||||
// checkConfigFile checks config files and returns one config file
|
// checkConfigFile checks config files and returns one config file
|
||||||
func checkConfigFile(filePath string) (string, error) {
|
func checkConfigFile(filePath string) (string, error) {
|
||||||
|
// Remove the quotes
|
||||||
|
filePath = strings.Trim(filePath, `"`)
|
||||||
// Define possible config file names
|
// Define possible config file names
|
||||||
configFiles := []string{filepath.Join(workingDir, "config.yaml"), filepath.Join(workingDir, "config.yml"), filePath}
|
configFiles := []string{filepath.Join(workingDir, "config.yaml"), filepath.Join(workingDir, "config.yml"), filePath}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user