diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..6245c6c --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,25 @@ +name: Build and Push Docker Image + +on: + push: + branches: + - master + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Check out the repository + uses: actions/checkout@v4 + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + push: true + tags: rogsme/bitwarden-to-keepass:latest diff --git a/README.md b/README.md index eb7049e..5a54bef 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ This repository is a fork of [davidnemec/bitwarden-to-keepass](https://github.co They did all of the work, I just added the custom URL functionality and created a Docker repository. All props to [davidnemec](https://github.com/davidnemec/)! -## How it works? +## How does it works? It uses the official [bitwarden-cli](https://bitwarden.com/help/article/cli/) client to export your items from the Bitwarden vault and move them into your KeePass database - that includes logins (with TOTP seeds, URIs, custom fields, attachments, notes) and secure notes. ## Usage @@ -72,8 +72,8 @@ In the end, the script will lock your vault and log out of your account: ``` sh Your vault is locked. -KeePass file /exports/my-cool-bitwarden-backup.kdbx generated successfully You have logged out. +KeePass file /exports/my-cool-bitwarden-backup.kdbx generated successfully ``` And you can find your file in your mounted directory! diff --git a/entrypoint.sh b/entrypoint.sh index 7eee086..d2541b5 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -38,7 +38,7 @@ echo "Generating KeePass file $DATABASE_PATH" python3 bitwarden-to-keepass.py || { echo "Failed to convert to KeePass"; exit 1; } bw lock -echo "KeePass file $DATABASE_PATH generated successfully" - # Log out of Bitwarden bw logout + +echo "KeePass file $DATABASE_PATH generated successfully"