File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -20,17 +20,17 @@ jobs:
2020 - name : Run unit tests
2121 run : |
2222 npm install
23- npm test
23+ npm run ci
2424 npm-publish :
2525 needs : unit-tests
2626 if : github.ref == 'refs/heads/master' && github.event_name == 'push'
27- runs-on : ubuntu-16 .04
27+ runs-on : ubuntu-20 .04
2828 steps :
2929 - uses : actions/checkout@v2
30- - name : Install node .js 12.x
30+ - name : Install Node .js
3131 uses : actions/setup-node@v2-beta
3232 with :
33- node-version : 12 .x
33+ node-version : 16 .x
3434 - name : Run semantic-release
3535 env :
3636 GH_TOKEN : ${{ secrets.GH_SEMANTIC_RELEASE_TOKEN }}
3939 if [[ -n "$GH_TOKEN" && -n "$NPM_TOKEN" ]]; then
4040 curl "https://raw.githubusercontent.com/pelias/ci-tools/master/semantic-release.sh" | bash -
4141 fi
42+ build-docker-images :
43+ # run this job if the unit tests passed and the npm-publish job was a success or was skipped
44+ # note: github actions won't run a job if you don't call one of the status check functions, so `always()` is called since it evalutes to `true`
45+ if : ${{ always() && needs.unit-tests.result == 'success' && (needs.npm-publish.result == 'success' || needs.npm-publish.result == 'skipped') }}
46+ needs : [unit-tests, npm-publish]
47+ runs-on : ubuntu-20.04
48+ steps :
49+ - uses : actions/checkout@v2
50+ - name : Build Docker images
51+ env :
52+ DOCKER_USERNAME : ${{ secrets.DOCKER_USERNAME }}
53+ DOCKER_PASSWORD : ${{ secrets.DOCKER_PASSWORD }}
54+ run : |
55+ curl "https://raw.githubusercontent.com/pelias/ci-tools/master/build-docker-images.sh" | bash -
Original file line number Diff line number Diff line change 2121 "scripts" : {
2222 "units" : " node test/units.js" ,
2323 "test" : " npm run units" ,
24+ "ci" : " npm run units" ,
2425 "lint" : " jshint ." ,
2526 "validate" : " npm ls"
2627 },
You can’t perform that action at this time.
0 commit comments