Skip to content

Commit

Permalink
Test build demo gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
rigon committed Dec 15, 2024
1 parent 2884a01 commit 3b62096
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,3 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
secrets: |
pixabay=${{ secrets.PIXABAY_API_KEY }}
token=${{ secrets.TOKEN }}
4 changes: 3 additions & 1 deletion Dockerfile.demo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN pip install pixabay

RUN --mount=type=secret,id=pixabay \
python <<EOF
import pixabay.core, os
import pixabay.core, os, time

terms=["Nature", "Architecture", "Animals", "Travel", "People", "Autumn", "The Grand Canyon", "Great Barrier Reef", "Maldives", "Paris", "Iceland",
"Wallpapers/Moutains", "Wallpapers/Rivers", "Wallpapers/Lanscapes", "Wallpapers/Abstract", "Wallpapers/Gradients", "Wallpapers/Patterns"]
Expand All @@ -26,6 +26,8 @@ with open('/run/secrets/pixabay', 'r') as file:
filename = "/photos/%s/%d.jpg" % (term, i+1)
print(filename)
search[i].download(filename, "largeImage")
time.sleep(3) # Sleep 3 seconds to avoid rate limit 100reqs/min

EOF

FROM rigon/photo-gallery:dev
Expand Down

0 comments on commit 3b62096

Please sign in to comment.