-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b791066
commit 4190482
Showing
4 changed files
with
125 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Build and Push Docker Image | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Extract version number | ||
id: get_version | ||
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
if: startsWith(github.ref, 'refs/tags/') | ||
|
||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: | | ||
davidecavestro/gphotos-cdp:dev-main | ||
davidecavestro/gphotos-cdp:${{ github.sha }} | ||
if: github.ref == 'refs/heads/main' | ||
|
||
- name: Build and push tagged Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: | | ||
davidecavestro/gphotos-cdp:${{ env.VERSION }} | ||
davidecavestro/gphotos-cdp:latest | ||
if: startsWith(github.ref, 'refs/tags/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,47 @@ | ||
# docker-gphotos-cdp | ||
Container image based on gphotos-cdp and chromedp/headless-shell | ||
|
||
A container image based on [gphotos-cdp](https://github.com/perkeep/gphotos-cdp) and [chromedp/headless-shell](https://github.com/chromedp/docker-headless-shell) to download items from Google Photos with their original geo-location attributes. | ||
|
||
|
||
# Browser profile for auth | ||
|
||
Launch the browser with a profile from scratch into an empty folder and complete the authentication. | ||
```bash | ||
google-chrome \ | ||
--user-data-dir=/path/to/gphotos/profile_family \ | ||
--no-first-run \ | ||
--password-store=basic \ | ||
--use-mock-keychain \ | ||
https://photos.google.com/ | ||
``` | ||
Close the browser: the folder you chose is enough to open a headless browser and access your photos. | ||
|
||
# Compose | ||
|
||
Launch the container mounting the profile folder and the directory where you want to | ||
|
||
```compose.yml | ||
--- | ||
version: "3" | ||
services: | ||
gphoto: | ||
image: davidecavestro/gphotos-cdp:dev-main | ||
# command: -start https://photos.google.com/photo/abcd1234... | ||
working_dir: /download | ||
volumes: | ||
- /etc/localtime:/etc/localtime | ||
- /path/to/gphotos/profile_family:/tmp/gphotos-cdp | ||
- /Volume1/Photos/data_gphotos:/dest | ||
environment: | ||
- DEST_DIR=/dest | ||
restart: no | ||
``` | ||
|
||
# Crontab | ||
|
||
Running `crontab -l` reveals: | ||
```bash | ||
0 20 * * * docker compose --project-name gphotos_family -f /path/to/gphotos/compose.yml up -d | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters