diff --git a/.github/workflows/main_3tee.yml b/.github/workflows/main_3tee.yml index a232716..2deaa63 100644 --- a/.github/workflows/main_3tee.yml +++ b/.github/workflows/main_3tee.yml @@ -33,10 +33,10 @@ jobs: tags: nhuttu.azurecr.io/${{ secrets.ACR_USERNAME }}/webimage:${{ github.sha }} file: ./Dockerfile secrets: | - NEXT_PUBLIC_TESTATAAN=${{ secrets.NEXT_PUBLIC_TESTATAAN }} - AZURE_CONNECTION_STRING=${{secrets.AZURE_CONNECTION_STRING}} - NEXT_PUBLIC_HEY=${{secrets.NEXT_PUBLIC_HEY}} - TEST_ENV=${{secrets.TEST_ENV}} + "NEXT_PUBLIC_TESTATAAN=${{ secrets.NEXT_PUBLIC_TESTATAAN }}" + "AZURE_CONNECTION_STRING=${{secrets.AZURE_CONNECTION_STRING}}" + "NEXT_PUBLIC_HEY=${{secrets.NEXT_PUBLIC_HEY}} + "TEST_ENV=${{secrets.TEST_ENV}}" deploy: runs-on: ubuntu-latest diff --git a/package-lock.json b/package-lock.json index 7d00e78..c024c78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "0.1.0", "dependencies": { "@azure/storage-blob": "^12.17.0", + "dotenv": "^16.4.1", "next": "14.1.0", "react": "^18", "react-dom": "^18" @@ -1510,6 +1511,17 @@ "node": ">=6.0.0" } }, + "node_modules/dotenv": { + "version": "16.4.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.1.tgz", + "integrity": "sha512-CjA3y+Dr3FyFDOAMnxZEGtnW9KBR2M0JvvUtXNW+dYJL5ROWxP9DUHCwgFqpMk0OXCc0ljhaNTr2w/kutYIcHQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", diff --git a/package.json b/package.json index 3d3a01e..0fafaf7 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ }, "dependencies": { "@azure/storage-blob": "^12.17.0", + "dotenv": "^16.4.1", "next": "14.1.0", "react": "^18", "react-dom": "^18" diff --git a/src/app/api/route.ts b/src/app/api/route.ts index ace8c6a..cb37fe8 100644 --- a/src/app/api/route.ts +++ b/src/app/api/route.ts @@ -1,3 +1,5 @@ +import "dotenv/config"; + export async function GET(request: Request) { return new Response( `Hello, ${request.url}!, is process defined or not? ${process.env.AZURE_CONNECTION_STRING?.substring(0, 7) ?? "It was not"} and then length ${process.env.AZURE_CONNECTION_STRING?.length} and test env: ${process.env.TEST_ENV}`,