2021-09-13 18:14:49 +02:00
|
|
|
name: build & publish Docker image
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 5
|
|
|
|
jobs:
|
2022-04-03 13:44:22 +02:00
|
|
|
lint-test:
|
|
|
|
name: lint & test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: setup Node
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 16.x
|
|
|
|
- run: npm install
|
2022-04-03 14:15:36 +02:00
|
|
|
- run: npm run lint
|
2022-04-03 13:44:22 +02:00
|
|
|
- run: npm test
|
2021-09-13 18:14:49 +02:00
|
|
|
build-and-publish:
|
|
|
|
name: build & publish Docker image
|
2022-04-03 13:44:22 +02:00
|
|
|
needs: [lint-test]
|
2021-09-13 18:14:49 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: check out the repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: log in to Docker Hub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
|
|
|
- name: build Docker image & push to Docker Hub
|
|
|
|
uses: docker/build-push-action@v2
|
|
|
|
with:
|
|
|
|
push: true
|
|
|
|
tags: |
|
|
|
|
derhuerst/db-rest:5
|
|
|
|
derhuerst/db-rest:latest
|