From dc68525700f6eef2393dc2f8dd19c79be88983a3 Mon Sep 17 00:00:00 2001 From: Anders Sparrevohn Date: Wed, 24 Aug 2022 09:09:54 +0200 Subject: [PATCH] Re-add travis files --- .travis.yml | 30 ++++++++++++++++++++++++++++++ publish-docker-image.sh | 5 +++++ 2 files changed, 35 insertions(+) create mode 100644 .travis.yml create mode 100644 publish-docker-image.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..ede947cdf --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +language: node_js +git: + depth: false +node_js: + - 16 + +services: + - docker + +cache: yarn + +if: (type = pull_request) OR (tag IS present) + +jobs: + include: + - stage: Install 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 application + if: type = pull_request + script: yarn build:all + - stage: Build and publish docker image + if: tag IS present + script: ./publish-docker-image.sh diff --git a/publish-docker-image.sh b/publish-docker-image.sh new file mode 100644 index 000000000..b554f6714 --- /dev/null +++ b/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 -t ghostfolio/ghostfolio:latest . +docker push ghostfolio/ghostfolio --all-tags