From 62a6d6243d6a912d76b2ceeac8a20857ee7f0155 Mon Sep 17 00:00:00 2001 From: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com> Date: Sat, 14 Jan 2023 00:35:44 +0530 Subject: [PATCH] =?UTF-8?q?chore:=20add`.nvmrc`=20&=20cache=20Docker=20bui?= =?UTF-8?q?ld(s)=20=F0=9F=93=A6=20(#707)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add supoort for `.nvmrc` Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com> * perf: enable caching of docker builds Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com> Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com> --- .github/workflows/ct.yml | 7 +++++-- .github/workflows/release.yml | 16 +++++++++++----- .nvmrc | 1 + 3 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 .nvmrc diff --git a/.github/workflows/ct.yml b/.github/workflows/ct.yml index b1cfd34..a49cc6e 100644 --- a/.github/workflows/ct.yml +++ b/.github/workflows/ct.yml @@ -50,7 +50,7 @@ jobs: - name: Run tests 🧪 run: xvfb-run --server-args="-screen 0 1024x768x24" npm test - + - name: Set up QEMU uses: docker/setup-qemu-action@v2 with: @@ -58,10 +58,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - + - name: Test Docker Build uses: docker/build-push-action@v3 with: context: . push: false platforms: linux/arm64,linux/amd64 + # experimental: https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#cache-backend-api + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b82a47a..af472cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,13 +1,13 @@ -name: "Build, Test, Release" +name: 'Build, Test, Release' -on: +on: workflow_dispatch: inputs: docker_user: - description: 'Docker Username' + description: 'Docker Username' required: true docker_token: - description: 'Docker Token' + description: 'Docker Token' required: true npm_token: description: 'NPM Token' @@ -15,7 +15,7 @@ on: jobs: release: - name: "Build, Test, Publish" + name: 'Build, Test, Publish' runs-on: ubuntu-20.04 steps: - name: Check out repository ✨ @@ -86,6 +86,9 @@ jobs: push: true tags: maptiler/tileserver-gl:latest, maptiler/tileserver-gl:v${{ env.PACKAGE_VERSION }} platforms: linux/arm64,linux/amd64 + # experimental: https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#cache-backend-api + cache-from: type=gha + cache-to: type=gha,mode=max - name: Create Tileserver Light Directory run: node publish.js --no-publish @@ -110,3 +113,6 @@ jobs: push: true tags: maptiler/tileserver-gl-light:latest, maptiler/tileserver-gl-light:v${{ env.PACKAGE_VERSION }} platforms: linux/arm64,linux/amd64 + # experimental: https://github.com/docker/build-push-action/blob/master/docs/advanced/cache.md#cache-backend-api + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..3c03207 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18