mirror of
https://github.com/fradelg/docker-mysql-cron-backup.git
synced 2025-01-18 16:22:33 +01:00
commit
37334bf3c3
5 changed files with 5 additions and 5 deletions
4
.github/workflows/image.yml
vendored
4
.github/workflows/image.yml
vendored
|
@ -10,14 +10,14 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the code
|
- name: Checkout the code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Test Bash scripts
|
- name: Test Bash scripts
|
||||||
run: sudo apt-get -qq update && sudo apt-get install -y devscripts shellcheck && make test
|
run: sudo apt-get -qq update && sudo apt-get install -y devscripts shellcheck && make test
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
needs: test
|
needs: test
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout the code
|
- name: Checkout the code
|
||||||
|
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
data
|
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ test:
|
||||||
# Checking for syntax errors
|
# Checking for syntax errors
|
||||||
set -e; for SCRIPT in *.sh; \
|
set -e; for SCRIPT in *.sh; \
|
||||||
do \
|
do \
|
||||||
sh -n $$SCRIPT; \
|
bash -n $$SCRIPT; \
|
||||||
done
|
done
|
||||||
|
|
||||||
# Checking for bashisms (currently not failing, but only listing)
|
# Checking for bashisms (currently not failing, but only listing)
|
||||||
|
|
|
@ -47,7 +47,7 @@ do
|
||||||
if [ -n "$MAX_BACKUPS" ]
|
if [ -n "$MAX_BACKUPS" ]
|
||||||
then
|
then
|
||||||
# Execute the delete script, delete older backup or other custom delete script
|
# Execute the delete script, delete older backup or other custom delete script
|
||||||
/delete.sh $db $EXT
|
/delete.sh "$db" $EXT
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
rm -rf "$FILENAME"
|
rm -rf "$FILENAME"
|
||||||
|
|
1
run.sh
1
run.sh
|
@ -18,7 +18,6 @@ fi
|
||||||
|
|
||||||
function final_backup {
|
function final_backup {
|
||||||
echo "=> Captured trap for final backup"
|
echo "=> Captured trap for final backup"
|
||||||
DATE=$(date +%Y%m%d%H%M)
|
|
||||||
echo "=> Requested last backup at $(date "+%Y-%m-%d %H:%M:%S")"
|
echo "=> Requested last backup at $(date "+%Y-%m-%d %H:%M:%S")"
|
||||||
exec /backup.sh
|
exec /backup.sh
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue