diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/build-deploy.yml index 9fc7c1e0..30797931 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/build-deploy.yml @@ -16,18 +16,20 @@ on: # Since each step is executed on the same runner, you can share data from one step to another. jobs: job1: + environment: # fetch variable from github environment + name: testing env: # Database Environment Variables - DATABASE_HOSTNAME: localhost - DB_PASSWORD: password123 - DATABASE_PORT: 5432 - DATABASE_NAME: fastapi - DB_USERNAME: postgres + DATABASE_HOSTNAME: ${{secrets.DATABASE_HOSTNAME}} # fetches values from Github Action Secrets / Environment + DB_PASSWORD: ${{secrets.DB_PASSWORD}} + DATABASE_PORT: ${{secrets.DATABASE_PORT}} + DATABASE_NAME: ${{secrets.DATABASE_NAME}} + DB_USERNAME: ${{secrets.DB_USERNAME}} # Authorization Environment Variables - SECRET_KEY: 09d25e094faa6ca2556c818166b7a9563b93f7099f6f0f4caa6cf63b88e8d3e7 - ALGORITHM: HS256 - ACCESS_TOKEN_EXPIRE_MINUTES: 30 + SECRET_KEY: ${{secrets.SECRET_KEY}} + ALGORITHM: ${{secrets.ALGORITHM}} + ACCESS_TOKEN_EXPIRE_MINUTES: ${{secrets.ACCESS_TOKEN_EXPIRE_MINUTES}} runs-on: ubuntu-latest steps: