updated dockerfile and workflow to pull api key from gitea when building.
All checks were successful
Docker Build & Publish / Build Docker (push) Successful in 1m3s

This commit is contained in:
ChrQR 2024-05-18 00:05:42 +02:00
parent dc6882cf71
commit 968a3c8d68
2 changed files with 6 additions and 10 deletions

View File

@ -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
gitea.rannes.dev/rannes.dev/local-weather:latest
secrets: |
"places_api=${{ secrets.PLACES_API }}"

View File

@ -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