refactor!: remove pipeline and just enable automerger & CI
Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
This commit is contained in:
parent
1569c7a14f
commit
285c3b98c8
6 changed files with 11 additions and 271 deletions
1
.github/dependabot.yml
vendored
1
.github/dependabot.yml
vendored
|
|
@ -1,6 +1,7 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: npm
|
||||
versioning-strategy: increase
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: daily
|
||||
|
|
|
|||
125
.github/workflows/builder.yml
vendored
125
.github/workflows/builder.yml
vendored
|
|
@ -1,125 +0,0 @@
|
|||
name: 'Build, Publish & Release'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
DOCKER_USER:
|
||||
description: 'The user who pushes on Docker Hub'
|
||||
required: true
|
||||
DOCKER_TOKEN:
|
||||
description: 'The token of the user who pushes on Docker Hub'
|
||||
required: true
|
||||
NPM_AUTH_TOKEN:
|
||||
description: 'The token of the user who pushes on NPM'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
release-docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository 🎉
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
- name: Setup node env 📦
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: 'package.json'
|
||||
check-latest: true
|
||||
cache: 'npm'
|
||||
- name: Get next version 🎉
|
||||
run: echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | head -n 1)" >> $GITHUB_ENV
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
with:
|
||||
platforms: 'arm64'
|
||||
- name: Set up Docker Buildx 🏗
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
buildkitd-flags: --debug
|
||||
- name: Log in to the Container registry 🔐
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ inputs.DOCKER_USER }}
|
||||
password: ${{ inputs.DOCKER_TOKEN }}
|
||||
- name: Extract metadata (tags, labels) for Docker 🙏🏽
|
||||
id: meta
|
||||
uses: docker/metadata-action@v4
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
- name: Build and publish full version to DockerHub 🦾
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }},maptiler/tileserver-gl:latest, maptiler/tileserver-gl:${{ env.PACKAGE_VERSION }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/arm64,linux/amd64
|
||||
release-full:
|
||||
needs:
|
||||
- release-docker
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository 🎉
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
- name: Setup node env 📦
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: 'package.json'
|
||||
check-latest: true
|
||||
cache: 'npm'
|
||||
- name: Get next version 🎉
|
||||
run: echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | head -n 1)" >> $GITHUB_ENV
|
||||
- name: Install dependencies 🚀
|
||||
working-directory: ./light
|
||||
run: npm i --prefer-offline --no-audit --omit=optional
|
||||
- name: Publish to Full Version 🚀
|
||||
run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
|
||||
env:
|
||||
NPM_TOKEN: ${{ github.event.inputs.npm_token }}
|
||||
release-light:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- release-docker
|
||||
steps:
|
||||
- name: Check out repository 🎉
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.ref }}
|
||||
- name: Setup node env 📦
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: 'package.json'
|
||||
check-latest: true
|
||||
cache: 'npm'
|
||||
- name: Get next version 🎉
|
||||
run: echo "PACKAGE_VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | head -n 1)" >> $GITHUB_ENV
|
||||
- name: Create Light Working Directory 📁
|
||||
run: node publish.js --no-publish
|
||||
- name: Install dependencies 🚀
|
||||
working-directory: ./light
|
||||
run: npm i --prefer-offline --no-audit --omit=optional
|
||||
- name: Publish to Light Version NPM
|
||||
working-directory: ./light
|
||||
run: npm config set //registry.npmjs.org/:_authToken ${NPM_AUTH_TOKEN}
|
||||
env:
|
||||
NPM_TOKEN: ${{ inputs.NPM_AUTH_TOKEN }}
|
||||
- name: Set up QEMU 📦
|
||||
uses: docker/setup-qemu-action@v2
|
||||
with:
|
||||
platforms: 'arm64'
|
||||
- name: Set up Docker Buildx 🏗
|
||||
uses: docker/setup-buildx-action@v2
|
||||
with:
|
||||
buildkitd-flags: --debug
|
||||
- name: Build and publish light version to DockerHub 🦾
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: ./light
|
||||
file: ./light/Dockerfile
|
||||
push: true
|
||||
tags: maptiler/tileserver-gl-light:latest,maptiler/tileserver-gl-light:${{ env.PACKAGE_VERSION }}
|
||||
platforms: linux/arm64,linux/amd64
|
||||
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
|
|
@ -1,7 +1,16 @@
|
|||
name: 'Continuous Integration'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}-1
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
checks: write
|
||||
|
|
|
|||
43
.github/workflows/codeql.yml
vendored
43
.github/workflows/codeql.yml
vendored
|
|
@ -1,43 +0,0 @@
|
|||
name: 'CodeQL'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
schedule:
|
||||
- cron: '45 23 * * 2'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [javascript]
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
queries: +security-and-quality
|
||||
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v2
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
with:
|
||||
category: '/language:${{ matrix.language }}'
|
||||
51
.github/workflows/ct.yml
vendored
51
.github/workflows/ct.yml
vendored
|
|
@ -1,51 +0,0 @@
|
|||
name: 'Continuous Testing'
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
ct:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install dependencies (Ubuntu)
|
||||
run: |-
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y g++-9
|
||||
|
||||
- name: Check out repository ✨ (non-dependabot)
|
||||
if: ${{ github.actor != 'dependabot[bot]' }}
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Check out repository 🎉 (dependabot)
|
||||
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Setup node env 📦
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version-file: 'package.json'
|
||||
|
||||
- name: Install dependencies 🚀
|
||||
run: npm i --prefer-offline --no-audit --omit=optional
|
||||
|
||||
- name: Update apt-get 🚀
|
||||
run: sudo apt-get update -qq
|
||||
|
||||
- name: Install required packages 🚀
|
||||
run: >-
|
||||
sudo apt-get install -qq libcairo2-dev libjpeg8-dev libpango1.0-dev
|
||||
libgif-dev build-essential g++ xvfb libgles2-mesa-dev libgbm-dev
|
||||
libxxf86vm-dev
|
||||
|
||||
- name: Pull test data 📦
|
||||
run: >-
|
||||
wget -O test_data.zip
|
||||
https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/test_data.zip
|
||||
|
||||
- name: Prepare test data 📦
|
||||
run: unzip -q test_data.zip -d test_data
|
||||
|
||||
- name: Run tests 🧪
|
||||
run: xvfb-run --server-args="-screen 0 1024x768x24" npm test
|
||||
51
.github/workflows/pipeline.yml
vendored
51
.github/workflows/pipeline.yml
vendored
|
|
@ -1,51 +0,0 @@
|
|||
name: 'The Pipeline'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
concurrency:
|
||||
group: ci-${{ github.ref }}-1
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
extract-branch:
|
||||
name: 'Fetch branch'
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
current_branch: ${{ steps.get-branch.outputs.current_branch }}
|
||||
steps:
|
||||
- name: Extract branch name 🕊
|
||||
id: get-branch
|
||||
run: echo "current_branch=${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
|
||||
ci:
|
||||
name: 'CI'
|
||||
needs:
|
||||
- extract-branch
|
||||
uses: maptiler/tileserver-gl/.github/workflows/ci.yml@master
|
||||
automerger:
|
||||
name: 'Auto Merge Bot PRs'
|
||||
needs:
|
||||
- ci
|
||||
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.user.login == 'dependabot[bot]' }}
|
||||
uses: maptiler/tileserver-gl/.github/workflows/automerger.yml@master
|
||||
ct:
|
||||
name: 'CT'
|
||||
needs:
|
||||
- extract-branch
|
||||
uses: maptiler/tileserver-gl/.github/workflows/ct.yml@master
|
||||
builder:
|
||||
name: 'Build, Publish & Release'
|
||||
needs:
|
||||
- extract-branch
|
||||
- ci
|
||||
- ct
|
||||
uses: maptiler/tileserver-gl/.github/workflows/builder.yml@master
|
||||
secrets:
|
||||
DOCKER_USER: ${{ secrets.DOCKER_USER }}
|
||||
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
||||
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
|
||||
Loading…
Reference in a new issue