Skip to content

change version number #33

change version number

change version number #33

Workflow file for this run

name: CI
on:
push:
branches:
- main
- v*
pull_request:
branches:
- main
- v*
jobs:
build:
strategy:
matrix:
version:
- tileserver: "v3.1.1"
mbtiles: "0-18_20210325T212157Z"
- tileserver: "v3.1.1"
mbtiles: "0-18_20220815T202133Z"
runs-on: ubuntu-latest
env:
IMAGE_NAME: sg-tileserver-gl
SELF_VERSION: "v1.1.0"
TILESERVER_GL_VERSION: "${{ matrix.version.tileserver }}"
MBTILES_TAG: "${{ matrix.version.mbtiles }}"
steps:
- name: Set TAG_NAME as env var export
run: |-
SUFFIX_TAG="tileserver-${TILESERVER_GL_VERSION}_mbtiles-${MBTILES_TAG}"
echo "TAG_NAME=${SELF_VERSION}_${SUFFIX_TAG}" >> $GITHUB_ENV
echo "OPENRESTY_SUFFIX=_openresty" >> $GITHUB_ENV
SELF_X_VERSION="$(echo ${SELF_VERSION} | cut -d . -f 1)"
echo "X_TAG_NAME=${SELF_X_VERSION}_${SUFFIX_TAG}" >> $GITHUB_ENV
SELF_XY_VERSION="$(echo ${SELF_VERSION} | cut -d . -f 1,2)"
echo "XY_TAG_NAME=${SELF_XY_VERSION}_${SUFFIX_TAG}" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 12
- name: Install tera-cli
run: |-
wget https://github.com/guangie88/tera-cli/releases/download/v0.4.0/tera_linux_amd64 -O /tmp/tera
chmod +x /tmp/tera
- name: Check differences between ci.yml and ci.yml.tmpl
run: |-
cp .github/workflows/ci.yml .github/workflows/ci.yml.backup
TERA=/tmp/tera .github-templates/apply-vars.sh
if ! diff .github/workflows/ci.yml .github/workflows/ci.yml.backup; then echo "ci.yml.tmpl and ci.yml differs!" && exit 1; fi
- name: Run setup-scripts
run: |-
MBTILES_TAG=${MBTILES_TAG} ./setup.sh
- name: Build Docker image (native)
run: |-
docker build . -t "${IMAGE_NAME}:${TAG_NAME}" \
--target native \
--build-arg TILESERVER_GL_VERSION="${TILESERVER_GL_VERSION}"
- name: Build Docker image (with openresty)
run: |-
docker build . -t "${IMAGE_NAME}:${TAG_NAME}${OPENRESTY_SUFFIX}" \
--build-arg TILESERVER_GL_VERSION="${TILESERVER_GL_VERSION}"
- name: Push Docker image
run: bash push-images.sh
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
IMAGE_ORG: ${{ secrets.IMAGE_ORG }}
if: github.event_name == 'push'