From e5f9a079a31dd5542041f8f8567cd8aa3625cd7d Mon Sep 17 00:00:00 2001 From: Laurent Sorber Date: Mon, 23 Sep 2024 11:20:26 +0200 Subject: [PATCH] fix: make OPENAI_API_KEY available in GitHub Actions --- .github/workflows/test.yml | 2 +- docker-compose.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 639e22e..1764a8a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: - name: Start Dev Container run: | git config --global init.defaultBranch main - PYTHON_VERSION=${{ matrix.python-version }} devcontainer up --workspace-folder . + PYTHON_VERSION=${{ matrix.python-version }} OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }} devcontainer up --workspace-folder . - name: Lint package run: devcontainer exec --workspace-folder . poe lint diff --git a/docker-compose.yml b/docker-compose.yml index e2eb595..85c2dea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,7 @@ services: UID: ${UID:-1000} GID: ${GID:-1000} environment: + - OPENAI_API_KEY - POETRY_PYPI_TOKEN_PYPI depends_on: - postgres @@ -27,6 +28,7 @@ services: entrypoint: [] command: [ "sh", "-c", "sudo chown user $$SSH_AUTH_SOCK && cp --update /opt/build/poetry/poetry.lock /workspaces/raglite/ && mkdir -p /workspaces/raglite/.git/hooks/ && cp --update /opt/build/git/* /workspaces/raglite/.git/hooks/ && zsh" ] environment: + - OPENAI_API_KEY - POETRY_PYPI_TOKEN_PYPI - SSH_AUTH_SOCK=/run/host-services/ssh-auth.sock depends_on: