diff --git a/.gitea/workflows/pipeline.yaml b/.gitea/workflows/pipeline.yaml index 1899dd6..525bab4 100644 --- a/.gitea/workflows/pipeline.yaml +++ b/.gitea/workflows/pipeline.yaml @@ -9,14 +9,6 @@ jobs: name: Build Docker runs-on: ubuntu-latest steps: - # - name: Make envfile - # uses: SpicyPizza/create-envfile@v2.0 - # with: - # envkey_PLACES_API: ${{ secrets.PLACES_API }} - # directory: ./ - # file_name: .env.production - # fail_on_empty: false - # sort_keys: false - name: Check out repository code 🛎️ uses: actions/checkout@v4 - name: Set up node 20 @@ -40,4 +32,6 @@ jobs: file: ./Dockerfile push: true tags: | - gitea.rannes.dev/rannes.dev/local-weather:latest \ No newline at end of file + gitea.rannes.dev/rannes.dev/local-weather:latest + secrets: | + "places_api=${{ secrets.PLACES_API }}" diff --git a/Dockerfile b/Dockerfile index bfb68e5..a81eda0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,9 @@ FROM node:18-alpine AS base FROM base AS deps RUN apk add --no-cache libc6-compat WORKDIR /app - +# Mount environment variables +RUN --mount=type=secret,id=places_api \ + cat /run/secrets/places_api # Debug: List files in current directory RUN ls -la