From 8a15e59c1fef2a2f6f29f9839822b9e903691e0f Mon Sep 17 00:00:00 2001 From: "Fco. Javier Delgado del Hoyo" <fradelg@Fcos-Air.home> Date: Mon, 9 Dec 2024 12:23:08 +0100 Subject: [PATCH 1/3] skip only timestamps when needed --- backup.sh | 5 ++--- docker-compose.yaml | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/backup.sh b/backup.sh index ead820e..499575d 100755 --- a/backup.sh +++ b/backup.sh @@ -32,8 +32,7 @@ do BASIC_OPTS="--single-transaction" if [ -n "$REMOVE_DUPLICATES" ] then - echo "WARNING: disabling comments in backup to remove deuplicate backups. Automatic database name detection won't work so set MYSQL_DATABASE on restore" - BASIC_OPTS="$BASIC_OPTS" --skip-comments + BASIC_OPTS="$BASIC_OPTS --skip-dump-date" fi if mysqldump $BASIC_OPTS $MYSQLDUMP_OPTS -h "$MYSQL_HOST" -P "$MYSQL_PORT" -u "$MYSQL_USER" -p"$MYSQL_PASS" $MYSQL_SSL_OPTS "$db" > "$FILENAME" then @@ -52,7 +51,7 @@ do cd /backup || exit && ln -s "$BASENAME" "$(basename "$LATEST")" if [ -n "$REMOVE_DUPLICATES" ] then - echo "=> Removing duplicate database dumps" + echo "==> Removing duplicate database dumps" fdupes -idN /backup/ fi if [ -n "$MAX_BACKUPS" ] diff --git a/docker-compose.yaml b/docker-compose.yaml index 64dcef0..5ac0e9d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -30,7 +30,6 @@ services: environment: - MYSQL_HOST=my_mariadb - MYSQL_USER=root - - MYSQL_DATABASE=${DATABASE_NAME} - MYSQL_PASS=${MARIADB_ROOT_PASSWORD} - MAX_BACKUPS=1 - INIT_BACKUP=1 From 1d3c439b654fa1d5400ccaf318d8b0ff8a051a1d Mon Sep 17 00:00:00 2001 From: "Fco. Javier Delgado del Hoyo" <fradelg@Fcos-Air.home> Date: Mon, 9 Dec 2024 12:32:31 +0100 Subject: [PATCH 2/3] split test and build jobs --- .github/workflows/{image.yml => build.yml} | 22 +----------------- .github/workflows/test.yml | 26 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 21 deletions(-) rename .github/workflows/{image.yml => build.yml} (59%) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/image.yml b/.github/workflows/build.yml similarity index 59% rename from .github/workflows/image.yml rename to .github/workflows/build.yml index 5827146..fab409a 100644 --- a/.github/workflows/image.yml +++ b/.github/workflows/build.yml @@ -1,34 +1,14 @@ + name: build docker image on: - workflow_dispatch: push: - branches: - - "**" tags: - "**" jobs: - test: - runs-on: ubuntu-22.04 - steps: - - name: Checkout the code - uses: actions/checkout@v4 - - name: Test Bash scripts - run: sudo apt-get -qq update && sudo apt-get install -y devscripts shellcheck && make test - - name: Test image - env: - VOLUME_PATH: /tmp/mariadb - DATABASE_NAME: foo - MARIADB_ROOT_PASSWORD: abcd - run: | - docker compose up -d mariadb - docker compose run backup /backup.sh - docker compose run backup /restore.sh /backup/latest.foo.sql.gz - docker compose stop build: runs-on: ubuntu-22.04 - needs: test steps: - name: Checkout the code uses: actions/checkout@v4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4460983 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,26 @@ +name: build docker image + +on: + workflow_dispatch: + push: + branches: + - "**" + +jobs: + test: + runs-on: ubuntu-22.04 + steps: + - name: Checkout the code + uses: actions/checkout@v4 + - name: Test Bash scripts + run: sudo apt-get -qq update && sudo apt-get install -y devscripts shellcheck && make test + - name: Test image + env: + VOLUME_PATH: /tmp/mariadb + DATABASE_NAME: foo + MARIADB_ROOT_PASSWORD: abcd + run: | + docker compose up -d mariadb + docker compose run backup /backup.sh + docker compose run backup /restore.sh /backup/latest.foo.sql.gz + docker compose stop From e01ecce080c724f7df3bfb7437646f5a766cecf4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 18:15:15 +0200 Subject: [PATCH 3/3] Bump actions/checkout from 4 to 5 (#136) Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fab409a..3759565 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout the code - uses: actions/checkout@v4 + uses: actions/checkout@v5 # https://github.com/docker/setup-qemu-action - name: Set up QEMU uses: docker/setup-qemu-action@v3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4460983..34f1dd5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout the code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Test Bash scripts run: sudo apt-get -qq update && sudo apt-get install -y devscripts shellcheck && make test - name: Test image