Merge pull request #373 from Zuehlke/368-status-page-improvements #109
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# run build on master brunch. build docker image and push to docker hub | |
name: master | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: install dependencies | |
run: npm i | |
- name: dependency check | |
run: npm run dependencyCheck | |
- name: run all tests | |
run: npm test | |
- name: build app & docker image | |
run: npm run build:dockerImage | |
# push docker image to repo (the --all-tags flag was introduced in version v20.10, older versions pushed all images automatically if no tag was provided) | |
- name: push docker image | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
docker -v; | |
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin; | |
docker image push --all-tags "${DOCKER_USERNAME}/poinz" || docker image push "${DOCKER_USERNAME}/poinz"; |