1
0
mirror of https://github.com/xzeldon/vwdump.git synced 2025-07-16 07:14:41 +03:00

feat: initial refactor and feature implementation

This is the first major commit after forking the original project. The
script has been almost completely rewritten to add new features.

- Implement AES-256 encryption with configurable PBKDF2 iterations (default 600k).
- Add Telegram integration for status updates and optional file uploads.
- Rework backup logic to use safe `sqlite3 .backup` method.
- Add GitHub Action to build/publish multi-arch Docker images and create
  GitHub Releases on git tags.

BREAKING CHANGE: The project is not backward-compatible, configuration
and behavior are entirely different from the original version.
This commit is contained in:
2025-06-14 11:57:05 +03:00
parent 1d523c8734
commit 12ca3f2ac7
5 changed files with 532 additions and 133 deletions

View File

@ -1,42 +1,68 @@
name: Dockerize
# When to run.
# In this case, manual only.
on:
workflow_dispatch:
push:
tags:
- "v*"
# Instructions on what to do.
# In this case, 'build' is the job and Ubuntu is the OS to run the job on.
jobs:
main:
release-and-publish:
runs-on: ubuntu-latest
env:
USERNAME: jmqm
REPOSITORY: vaultwarden_backup
TAG: latest
permissions:
contents: write
packages: write
steps:
- name: Check out repo
uses: actions/checkout@v2.3.4
# Step 1: Check out the repository code
- name: Check out repository
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v1.10.0
with:
username: ${{ env.USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Update README and description
uses: peter-evans/dockerhub-description@v2.4.3
with:
username: ${{ env.USERNAME }}
password: ${{ secrets.DOCKER_HUB_PASSWORD }} # This action does not support tokens.
repository: ${{ env.USERNAME }}/${{ env.REPOSITORY }}
short-description: ${{ github.event.repository.description }}
readme-filepath: ./README.md
# Step 2: Set up QEMU for multi-architecture builds (e.g., for arm64)
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build image and push to Docker hub
uses: docker/build-push-action@v2.6.1
# Step 3: Set up Docker Buildx, which is required for multi-platform builds
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Step 4: Log in to the GitHub Container Registry
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Step 5: Extract metadata for Docker tags and labels
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
flavor: |
latest=auto
# Step 6: Build and push the multi-platform Docker image
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.USERNAME }}/${{ env.REPOSITORY }}:${{ env.TAG }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# Step 7: Create a GitHub Release
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
token: ${{ secrets.GITHUB_TOKEN }}