factorio-docker/.travis.yml

41 lines
1.3 KiB
YAML
Raw Normal View History

dist: xenial
language: bash
services:
- docker
2019-11-11 22:03:20 +01:00
addons:
apt:
packages:
- jq
jobs:
include:
- stage: test
script:
# Travis gets rate limited by Docker HUB.
2021-01-15 11:30:40 +01:00
- |
[[ -n $DOCKER_PASSWORD && -n $DOCKER_USERNAME ]] && echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- git ls-files --exclude='*Dockerfile' --ignored | xargs --max-lines=1 -I{} sh -c 'docker run --rm -i -v ${PWD}/.hadolint.yaml:/.hadolint.yaml hadolint/hadolint < "$1"' -- {}
- bash -c 'shopt -s globstar; shellcheck **/*.sh'
2019-11-11 22:03:20 +01:00
- &build
2019-11-20 22:57:13 +01:00
stage: Build & update Docker HUB description
2020-11-25 09:32:00 +01:00
env: VERSION_SHORT=1.1 EXTRA_TAG=latest
script:
- ./build.sh $VERSION_SHORT
2020-11-24 09:24:53 +01:00
- <<: *build
2020-11-25 09:32:00 +01:00
env: VERSION_SHORT=1.0 EXTRA_TAG=stable
- <<: *build
env: VERSION_SHORT=0.18
- <<: *build
env: VERSION_SHORT=0.17
- <<: *build
env: VERSION_SHORT=0.16
- <<: *build
env: VERSION_SHORT=0.15
- <<: *build
env: VERSION_SHORT=0.14
- <<: *build
if: branch = master AND type != pull_request
2020-05-07 22:20:25 +02:00
script: DOCKERHUB_USERNAME=$DOCKER_USERNAME DOCKERHUB_PASSWORD=$DOCKER_PASSWORD DOCKERHUB_REPOSITORY='factoriotools/factorio' README_FILEPATH='./README.md' ./update-dockerhub-description.sh