Update .gitea/workflows/deploy.yml
Deployment / test (push) Successful in 1m47s
Deployment / deploy (push) Successful in 5s

This commit is contained in:
2023-07-15 00:51:06 +02:00
parent 42abc39bbe
commit 46f0bef0ab
+5 -4
View File
@@ -6,6 +6,7 @@ on:
- dev - dev
env: env:
# Global Env Variables readable in all jobs of this workflow
MONGODB_CLUSTER_ADDRESS: coursow-de.bwnpjvo.mongodb.net MONGODB_CLUSTER_ADDRESS: coursow-de.bwnpjvo.mongodb.net
MONGODB_USERNAME: mongo MONGODB_USERNAME: mongo
MONGODB_PASSWORD: mongotest MONGODB_PASSWORD: mongotest
@@ -15,7 +16,7 @@ env:
jobs: jobs:
test: test:
env: env:
ONLY_HERE: ofcourse ONLY_HERE: ofcourse # Will be only readable in this 'test' job
environment: testing environment: testing
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -45,12 +46,12 @@ jobs:
- name: Run tests - name: Run tests
run: npm test run: npm test
- name: Output information - name: Output information
run: echo "$ONLY_HERE" run: echo "$ONLY_HERE" # Works... Will return a value as defined in this job
deploy: deploy:
needs: test needs: test
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Output information - name: Output information
run: | run: |
echo "$ONLY_HERE" echo "$ONLY_HERE" # Will not work... As it is not defined in global env or this 'deploy' job env
echo "$MONGODB_USERNAME" echo "$MONGODB_USERNAME" # Works... Will return a value as defined in global env