From 46f0bef0ab36e6625f223741a3e76fd901f16b31 Mon Sep 17 00:00:00 2001 From: Tom - Henry Coursow Date: Sat, 15 Jul 2023 00:51:06 +0200 Subject: [PATCH] Update .gitea/workflows/deploy.yml --- .gitea/workflows/deploy.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index bc1c090..05a163c 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -6,6 +6,7 @@ on: - dev env: + # Global Env Variables readable in all jobs of this workflow MONGODB_CLUSTER_ADDRESS: coursow-de.bwnpjvo.mongodb.net MONGODB_USERNAME: mongo MONGODB_PASSWORD: mongotest @@ -15,7 +16,7 @@ env: jobs: test: env: - ONLY_HERE: ofcourse + ONLY_HERE: ofcourse # Will be only readable in this 'test' job environment: testing runs-on: ubuntu-latest steps: @@ -45,12 +46,12 @@ jobs: - name: Run tests run: npm test - name: Output information - run: echo "$ONLY_HERE" + run: echo "$ONLY_HERE" # Works... Will return a value as defined in this job deploy: needs: test runs-on: ubuntu-latest steps: - name: Output information run: | - echo "$ONLY_HERE" - echo "$MONGODB_USERNAME" + echo "$ONLY_HERE" # Will not work... As it is not defined in global env or this 'deploy' job env + echo "$MONGODB_USERNAME" # Works... Will return a value as defined in global env