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>
This commit is contained in:
parent
f12866b9ec
commit
76dbf78279
31
.travis.yml
31
.travis.yml
@ -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
|
||||
|
5
publish-docker-image.sh
Executable file
5
publish-docker-image.sh
Executable file
@ -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…
x
Reference in New Issue
Block a user