From c12c85d4806728827b27f3358641f03d6c37d014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gon=C3=A7alves?= Date: Tue, 10 Dec 2024 11:59:54 +0000 Subject: [PATCH] Use pixabay to build demo gallery --- .github/workflows/docker-image.yml | 2 ++ Dockerfile.demo | 38 +++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 7ac0acd..1cfb884 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -92,3 +92,5 @@ jobs: platforms: linux/amd64,linux/arm64,linux/arm/v6 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + secrets: | + pixabay=${{ secrets.PIXABAY_API_KEY }} diff --git a/Dockerfile.demo b/Dockerfile.demo index df09ec5..93e8dc1 100644 --- a/Dockerfile.demo +++ b/Dockerfile.demo @@ -1,9 +1,31 @@ -FROM rigon/photo-gallery:latest +FROM python:alpine + +RUN pip install pixabay + +RUN --mount=type=secret,id=pixabay \ + PIXABAY_API_KEY=$(cat /run/secrets/pixabay) && \ + python <