1
0
mirror of https://github.com/docker-library/postgres.git synced 2025-07-28 10:42:06 +03:00

Add initial GitHub Actions CI

This commit is contained in:
Tianon Gravi
2020-04-27 12:01:16 -07:00
parent a6d35fbd1d
commit 986d94fe36
5 changed files with 77 additions and 65 deletions

View File

@ -9,9 +9,6 @@ if [ ${#versions[@]} -eq 0 ]; then
fi
versions=( "${versions[@]%/}" )
# sort version numbers with highest last (so it goes first in .travis.yml)
IFS=$'\n'; versions=( $(echo "${versions[*]}" | sort -V) ); unset IFS
defaultDebianSuite='buster-slim'
declare -A debianSuite=(
# https://github.com/docker-library/postgres/issues/582
@ -46,7 +43,6 @@ fetch_suite_arches() {
fi
}
travisEnv=
for version in "${versions[@]}"; do
tag="${debianSuite[$version]:-$defaultDebianSuite}"
suite="${tag%%-slim}"
@ -134,13 +130,5 @@ for version in "${versions[@]}"; do
# JIT / LLVM is only supported in PostgreSQL 11+ (https://github.com/docker-library/postgres/issues/475)
sed -i '/llvm/d' "$version/$variant/Dockerfile"
fi
travisEnv="\n - VERSION=$version VARIANT=$variant$travisEnv"
done
travisEnv="\n - VERSION=$version FORCE_DEB_BUILD=1$travisEnv"
travisEnv="\n - VERSION=$version$travisEnv"
done
travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
cat <<<"$travis" > .travis.yml