From 14bbee6bd8a69f588469f9d3da62358313cd206b Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 4 Sep 2021 18:14:11 -0400 Subject: [PATCH 01/15] add actions file --- .github/workflows/docker-publish.yml | 50 ++++++++++++++++++++++++++++ CHANGELOG.md | 1 + 2 files changed, 51 insertions(+) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000000..3ba7b60b22 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,50 @@ +name: Docker + +on: + schedule: + - cron: '19 17 * * *' + push: + branches: [ master ] + tags: [ '*.*.*' ] + pull_request: + branches: [ master ] + +env: + REGISTRY: docker.io + IMAGE_NAME: parseplatform/parse-dashboard + + +jobs: + build: + + runs-on: ubuntu-18.04 + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Log into Docker Hub + if: github.event_name != 'pull_request' + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@v3 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + flavor: | + latest=true + + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fb0b32bac..70b8dae80e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -134,6 +134,7 @@ ___ - Add NPM package-lock version check to CI (Manuel Trezza) [#7333](https://github.com/parse-community/parse-server/pull/7333) - Fix incorrect LiveQuery events triggered for multiple subscriptions on the same class with different events [#7341](https://github.com/parse-community/parse-server/pull/7341) - Fix select and excludeKey queries to properly accept JSON string arrays. Also allow nested fields in exclude (Corey Baker) [#7242](https://github.com/parse-community/parse-server/pull/7242) +- CI now pushes docker images to Docker Hub (Corey Baker) [#7548](https://github.com/parse-community/parse-server/pull/7548) ___ ## 4.5.0 From 152f90c1bb7748b28499ec75155cb22713901056 Mon Sep 17 00:00:00 2001 From: Corey Date: Sat, 4 Sep 2021 18:29:01 -0400 Subject: [PATCH 02/15] nit --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5266f1ad55..8e6723c7aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -196,7 +196,6 @@ ___ ## 4.5.1 *This version was published by mistake and was deprecated.* ->>>>>>> master ## 4.5.0 [Full Changelog](https://github.com/parse-community/parse-server/compare/4.4.0...4.5.0) From a21f8b5e8ca139b476cd917d4261b4a2f5131426 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 5 Sep 2021 07:00:57 -0400 Subject: [PATCH 03/15] add multi-platform --- .github/workflows/docker-publish.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 3ba7b60b22..d0ddb4de30 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -26,6 +26,10 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 + - name: Set up QEMU + id: qemu + uses: docker/setup-qemu-action@v1 + - name: Log into Docker Hub if: github.event_name != 'pull_request' uses: docker/login-action@v1 @@ -45,6 +49,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . + platforms: linux/amd64, linux/arm/v6, linux/s390x, linux/ppc64le, linux/arm/v7, linux/arm64/v8 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From caae4ed8489b75a909262b59a8867c1417601e8a Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 5 Sep 2021 07:03:01 -0400 Subject: [PATCH 04/15] add buildx --- .github/workflows/docker-publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index d0ddb4de30..a313181b21 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -30,6 +30,9 @@ jobs: id: qemu uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Log into Docker Hub if: github.event_name != 'pull_request' uses: docker/login-action@v1 From 4b5bb18d93087a9c47ce615f1b49dadde1422fe6 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 5 Sep 2021 07:34:41 -0400 Subject: [PATCH 05/15] reduce platforms --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index a313181b21..0d887d400f 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -52,7 +52,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64, linux/arm/v6, linux/s390x, linux/ppc64le, linux/arm/v7, linux/arm64/v8 + platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From d3995e68f8815cc9f72f8589d8c71f15f584541c Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 5 Sep 2021 07:40:15 -0400 Subject: [PATCH 06/15] remove arm7 --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 0d887d400f..3d68e0b78e 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -52,7 +52,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8 + platforms: linux/amd64, linux/arm/v6, linux/arm64/v8 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From e31bb88d4529d36adf63008d8f5ca4c7e9e9a240 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 5 Sep 2021 07:46:17 -0400 Subject: [PATCH 07/15] add back arm7 --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 3d68e0b78e..0d887d400f 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -52,7 +52,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64, linux/arm/v6, linux/arm64/v8 + platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From dc965f2595473664a264afe53c6db046b0724f1e Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 5 Sep 2021 09:16:57 -0400 Subject: [PATCH 08/15] add missing archs --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 0d887d400f..d0e0c65d7b 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -52,7 +52,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8 + platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8, linux/ppc64le, linux/s390x push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 95eb57011e45f337f46506575b41f3be01eb8cb8 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 5 Sep 2021 09:42:46 -0400 Subject: [PATCH 09/15] remove failing image --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index d0e0c65d7b..895d37bac3 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -52,7 +52,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8, linux/ppc64le, linux/s390x + platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8, linux/ppc64le push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From 987a84b89914deeed76ab61ec9c1c36bf2bf2aa9 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 5 Sep 2021 09:57:27 -0400 Subject: [PATCH 10/15] add back in linux/s390x --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 895d37bac3..d0e0c65d7b 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -52,7 +52,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8, linux/ppc64le + platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8, linux/ppc64le, linux/s390x push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From b0c32dd5e05c84deed3b1946b0f6eb205441b69e Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 5 Sep 2021 10:14:06 -0400 Subject: [PATCH 11/15] switch image name to parse-server --- .github/workflows/docker-publish.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index d0e0c65d7b..d97cf518a0 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -11,8 +11,7 @@ on: env: REGISTRY: docker.io - IMAGE_NAME: parseplatform/parse-dashboard - + IMAGE_NAME: parseplatform/parse-server jobs: build: @@ -52,7 +51,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8, linux/ppc64le, linux/s390x + platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8, linux/ppc64le push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From c459017ebb3ec3b6a806e6e5ae7fc8d4421f1b22 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 5 Sep 2021 10:24:28 -0400 Subject: [PATCH 12/15] remove failing images --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index d97cf518a0..5cf2f23845 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -51,7 +51,7 @@ jobs: uses: docker/build-push-action@v2 with: context: . - platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8, linux/ppc64le + platforms: linux/amd64, linux/arm/v6, linux/arm/v7, linux/arm64/v8 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From efc06ef9a349120226f6342f175de6dfe7d9512d Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 5 Sep 2021 11:26:42 -0400 Subject: [PATCH 13/15] nit spelling --- src/LiveQuery/ParseWebSocketServer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LiveQuery/ParseWebSocketServer.js b/src/LiveQuery/ParseWebSocketServer.js index fa521080ed..a0d1e9891f 100644 --- a/src/LiveQuery/ParseWebSocketServer.js +++ b/src/LiveQuery/ParseWebSocketServer.js @@ -11,7 +11,7 @@ export class ParseWebSocketServer { config.server = server; const wss = loadAdapter(config.wssAdapter, WSAdapter, config); wss.onListen = () => { - logger.info('Parse LiveQuery Server starts running'); + logger.info('Parse LiveQuery Server started running'); }; wss.onConnection = ws => { ws.on('error', error => { From f743c1aa4c8027d4fe4abf878bda64e8815801b3 Mon Sep 17 00:00:00 2001 From: Corey Date: Sun, 5 Sep 2021 13:03:47 -0400 Subject: [PATCH 14/15] Nit --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 5cf2f23845..0e1226fb13 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -1,4 +1,4 @@ -name: Docker +name: docker on: schedule: From a6f2a7990b67d66743461420bbcd6574cd7b1407 Mon Sep 17 00:00:00 2001 From: Corey Date: Mon, 6 Sep 2021 21:13:22 -0400 Subject: [PATCH 15/15] add comment about nightly builds --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 0e1226fb13..84c641521f 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -2,7 +2,7 @@ name: docker on: schedule: - - cron: '19 17 * * *' + - cron: '19 17 * * *' # Nightly builds capture upstream updates to dependency images such as node. push: branches: [ master ] tags: [ '*.*.*' ]