implement docker build on tags (#542)

Co-authored-by: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>

Co-authored-by: Valentin Zickner <github@zickner.ch>
pull/544/head
Thomas Kaul 3 years ago committed by GitHub
parent f12866b9ec
commit 76dbf78279
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,9 +3,28 @@ git:
depth: false
node_js:
- 14
before_script:
- yarn
script:
- yarn format:check
- yarn test
- yarn build:all
services:
- docker
cache: yarn
if: (type = pull_request) OR (tag IS present)
jobs:
include:
- stage: download dependencies
if: type = pull_request
script: yarn --frozen-lockfile
- stage: check formatting
if: type = pull_request
script: yarn format:check
- stage: execute tests
if: type = pull_request
script: yarn test
- stage: build
if: type = pull_request
script: yarn build:all
- stage: build and push docker images
if: tag IS present
script: ./publish-docker-image.sh

@ -0,0 +1,5 @@
set -xe
echo "$DOCKER_HUB_ACCESS_TOKEN" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin
docker build -t ghostfolio/ghostfolio:$TRAVIS_TAG .
docker push ghostfolio/ghostfolio:$TRAVIS_TAG
Loading…
Cancel
Save