From a2b89f13640981d1727056ff0899629bd58131d6 Mon Sep 17 00:00:00 2001 From: Vladyslav Baidak Date: Mon, 11 Mar 2024 19:51:48 +0100 Subject: [PATCH] v2.39.0 --- .github/workflows/publish.yml | 33 +++++++++++++ CHANGELOG.md | 4 ++ Dockerfile | 4 ++ README.md | 21 ++++++++- templates/01.template | 77 ++++++++++++++++++++++++++++++ templates/02.template | 89 +++++++++++++++++++++++++++++++++++ 6 files changed, 226 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish.yml create mode 100644 CHANGELOG.md create mode 100644 Dockerfile create mode 100644 templates/01.template create mode 100644 templates/02.template diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b2d888d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,33 @@ +name: Publish Docker image + +on: + push: + tags: + - '**' +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v4 + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: scalified/docker-volume-backup + tags: | + type=raw,value=latest + type=semver,pattern={{version}} + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4370fa3 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,4 @@ +# v2.39.0 + +[v2.39.0](https://github.com/offen/docker-volume-backup/releases/tag/v2.39.0) + diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4ad83ea --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM offen/docker-volume-backup:v2.39.0 + +COPY templates /etc/dockervolumebackup/notifications.d + diff --git a/README.md b/README.md index 9745a96..ed1e1db 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,19 @@ -# docker-volume-backup -Docker Volume Backup +# Docker Volume Backup + +[![Build Status](https://github.com/Scalified/docker-volume-backup/actions/workflows/publish.yml/badge.svg)](https://github.com/Scalified/docker-volume-backup/actions) +[![Docker Pulls](https://img.shields.io/docker/pulls/scalified/docker-volume-backup.svg)](https://hub.docker.com/r/scalified/docker-volume-backup) + +## Description + +The [offen/docker-volume-backup](https://github.com/offen/docker-volume-backup) repository clone with HTML notification templates + +## How-To + +See [offen/docker-volume-backup](https://github.com/offen/docker-volume-backup) documentation + +## Scalified Links + +* [Scalified](https://www.scalified.com) +* [Scalified Official Facebook Page](https://www.facebook.com/scalified) +* Scalified Support + diff --git a/templates/01.template b/templates/01.template new file mode 100644 index 0000000..b84beab --- /dev/null +++ b/templates/01.template @@ -0,0 +1,77 @@ +{{ define "title_success" -}} +✅ [INFO]: Backup Success: {{ .Config.BackupStopDuringBackupLabel }} +{{- end }} + +{{ define "body_success" -}} + + + + + ✅ [INFO]: Backup Success: {{ .Config.BackupStopDuringBackupLabel }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
INFO
ℹ️ Name{{ .Config.BackupStopDuringBackupLabel }} ({{ .Config.BackupLatestSymlink }})
▶️ Start time{{ .Stats.StartTime | formatTime }}
⏹️ End time{{ .Stats.EndTime | formatTime }}
⌛ Took time{{ .Stats.TookTime }}
🛑 Stopped containers{{ .Stats.Containers.Stopped }}/{{ .Stats.Containers.All }} ({{ .Stats.Containers.StopErrors }} errors)
⚖️ Backup size{{ .Stats.BackupFile.Size | formatBytesBin }} / {{ .Stats.BackupFile.Size | formatBytesDec }}
🗑️ Pruned backups{{ .Stats.Storages.Local.Pruned }}/{{ .Stats.Storages.Local.Total }} ({{ .Stats.Storages.Local.PruneErrors }} errors)
+
+
+ + +{{- end }} + diff --git a/templates/02.template b/templates/02.template new file mode 100644 index 0000000..13afae6 --- /dev/null +++ b/templates/02.template @@ -0,0 +1,89 @@ +{{ define "title_failure" -}} +💥 [ERROR]: Backup Failure: {{ .Config.BackupStopDuringBackupLabel }} +{{- end }} + +{{ define "body_failure" -}} + + + + + 💥 [ERROR]: Backup Failure: {{ .Config.BackupStopDuringBackupLabel }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
INFO
ℹ️ Name{{ .Config.BackupStopDuringBackupLabel }} ({{ .Config.BackupLatestSymlink }})
💥 Error{{ .Error }}
▶️ Start time{{ .Stats.StartTime | formatTime }}
⏹️ End time{{ .Stats.EndTime | formatTime }}
⌛ Took time{{ .Stats.TookTime }}
🛑 Stopped containers{{ .Stats.Containers.Stopped }}/{{ .Stats.Containers.All }} ({{ .Stats.Containers.StopErrors }} errors)
⚖️ Backup size{{ .Stats.BackupFile.Size | formatBytesBin }} / {{ .Stats.BackupFile.Size | formatBytesDec }}
🗑️ Pruned backups{{ .Stats.Storages.Local.Pruned }}/{{ .Stats.Storages.Local.Total }} ({{ .Stats.Storages.Local.PruneErrors }} errors)
+
+
+ + + + + + + +
LOG
{{ .Stats.LogOutput }}
+ + +{{- end }} +