Using workflow scoped working-directory

This commit is contained in:
Chris Patterson
2020-06-03 09:52:23 -04:00
committed by GitHub
parent e74bfefe72
commit cb07b6a841

View File

@@ -7,7 +7,11 @@ on:
pull_request:
branches:
- master
defaults:
run:
working-directory: ./mongodb
jobs:
container-job:
runs-on: ubuntu-latest
@@ -22,13 +26,11 @@ jobs:
image: mongo
ports:
- 27017:27017
steps:
- uses: actions/checkout@v1
- run: npm ci
working-directory: ./mongodb
- run: node client.js
working-directory: ./mongodb
env:
# use mongodb for the host here because we have specified a container for the job.
# If we were running the job on the VM this would be localhost
@@ -50,9 +52,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- run: npm ci
working-directory: ./mongodb
- run: node client.js
working-directory: ./mongodb
env:
# use localhost for the host here because we are running the job on the VM.
# If we were running the job on in a container this would be mongodb