mirror of
https://github.com/factoriotools/factorio-docker.git
synced 2024-11-07 03:07:24 +01:00
605ca74c0e
* Quote all vars, remove useless echo/sub-shell, add shebands, fail on unset vars, enable pipefail, formatting * Add CI including linting via hadolint nad shellcheck * Update all base images to tag 3.9 * Switch to maintainer labels * Quote vars * Remove commented code * Ignore if the folder exists
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
dist: xenial
|
|
sudo: required
|
|
language: bash
|
|
services:
|
|
- docker
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- jq
|
|
|
|
jobs:
|
|
include:
|
|
- stage: test
|
|
env: HADOLINT=${HOME}/hadolint
|
|
install: curl -sLo ${HADOLINT} $(curl -s https://api.github.com/repos/hadolint/hadolint/releases/latest?access_token=${GITHUB_TOKEN} | jq -r '.assets | .[] | select(.name=="hadolint-Linux-x86_64") | .browser_download_url')
|
|
&& chmod 700 ${HADOLINT}
|
|
script:
|
|
- git ls-files --exclude='*Dockerfile' --ignored | xargs --max-lines=1 ${HADOLINT}
|
|
- bash -c 'shopt -s globstar; shellcheck **/*.sh'
|
|
- &build
|
|
stage: build
|
|
env: VERSION=0.17
|
|
script:
|
|
- ./build.sh $VERSION
|
|
after_success:
|
|
- if [ "$TRAVIS_BRANCH" == "master" ]; then
|
|
echo "$DOCKER_PASSWORD" | DOCKER login -u "$DOCKER_USERNAME" --password-stdin
|
|
docker push "factoriotools/docker_factorio_server:$VERSION"
|
|
fi
|
|
- <<: *build
|
|
env: VERSION=0.16
|
|
- <<: *build
|
|
env: VERSION=0.15
|
|
- <<: *build
|
|
env: VERSION=0.14
|