diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 496b7b1..0f90d1f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,6 +1,7 @@ version: 2 updates: - package-ecosystem: npm + versioning-strategy: increase directory: '/' schedule: interval: daily diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml deleted file mode 100644 index 79c7a47..0000000 --- a/.github/workflows/builder.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c776aa5..aad491c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 883d3bd..0000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -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 }}' diff --git a/.github/workflows/ct.yml b/.github/workflows/ct.yml deleted file mode 100644 index 663e4fe..0000000 --- a/.github/workflows/ct.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml deleted file mode 100644 index 0e3c3a5..0000000 --- a/.github/workflows/pipeline.yml +++ /dev/null @@ -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 }}