From 8fbd3088339c742fe0aebfb5c04247bbbacbb34a Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Tue, 8 Oct 2024 09:05:31 +0300 Subject: [PATCH 01/31] chore: add ARM image build support --- .github/workflows/charterafrica-deploy-dev.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/charterafrica-deploy-dev.yml b/.github/workflows/charterafrica-deploy-dev.yml index 6d100778cf..e91e409e8e 100644 --- a/.github/workflows/charterafrica-deploy-dev.yml +++ b/.github/workflows/charterafrica-deploy-dev.yml @@ -2,7 +2,9 @@ name: charterAFRICA | Deploy | DEV on: push: - branches: [main] + branches: + - main + - chore/build-arm-image paths: - "apps/charterafrica/**" - "Dockerfile" @@ -32,9 +34,14 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Cache Docker layers uses: actions/cache@v4 with: @@ -63,6 +70,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" From 2db75212727d6a81ad2799a6d705af7ca3e6106f Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Tue, 8 Oct 2024 11:50:18 +0300 Subject: [PATCH 02/31] fix: formatting with prettier --- .github/workflows/charterafrica-deploy-dev.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/charterafrica-deploy-dev.yml b/.github/workflows/charterafrica-deploy-dev.yml index e91e409e8e..e762a1641b 100644 --- a/.github/workflows/charterafrica-deploy-dev.yml +++ b/.github/workflows/charterafrica-deploy-dev.yml @@ -41,7 +41,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - name: Cache Docker layers uses: actions/cache@v4 with: From 11e285d93a0b07845b5a5285a3d14e1b58c32d44 Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Tue, 8 Oct 2024 14:33:58 +0300 Subject: [PATCH 03/31] chore: add ARM image build support --- .github/workflows/civicsignalblog-deploy-prod.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/civicsignalblog-deploy-prod.yml b/.github/workflows/civicsignalblog-deploy-prod.yml index 8ae44bbdbf..e46bb6b77b 100644 --- a/.github/workflows/civicsignalblog-deploy-prod.yml +++ b/.github/workflows/civicsignalblog-deploy-prod.yml @@ -31,6 +31,10 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + # Set up Node since it's required by version-check # https://github.com/EndBug/version-check#github-workflow - name: Setup Node.js @@ -84,6 +88,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" From 2b2f7d435a4de044d7c5f94d5981d284d65c59b2 Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Tue, 8 Oct 2024 14:54:22 +0300 Subject: [PATCH 04/31] chore: add ARM Image build support --- .github/workflows/climatemappedafrica-deploy-dev.yml | 9 ++++++++- .github/workflows/codeforafrica-deploy-dev.yml | 9 ++++++++- .github/workflows/pesayetu-deploy-dev.yml | 9 ++++++++- .github/workflows/roboshield-deploy-dev.yml | 9 ++++++++- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.github/workflows/climatemappedafrica-deploy-dev.yml b/.github/workflows/climatemappedafrica-deploy-dev.yml index 804cbaedea..cd5ee3ca37 100644 --- a/.github/workflows/climatemappedafrica-deploy-dev.yml +++ b/.github/workflows/climatemappedafrica-deploy-dev.yml @@ -2,7 +2,9 @@ name: Climate Mapped Africa | Deploy | DEV on: push: - branches: [main] + branches: + - main + - chore/build-arm-image paths: - "apps/climatemappedafrica/**" - "Dockerfile" @@ -33,6 +35,10 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -58,6 +64,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 target: climatemappedafrica-runner push: true tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}" diff --git a/.github/workflows/codeforafrica-deploy-dev.yml b/.github/workflows/codeforafrica-deploy-dev.yml index 44b7d919b2..c84bba4042 100644 --- a/.github/workflows/codeforafrica-deploy-dev.yml +++ b/.github/workflows/codeforafrica-deploy-dev.yml @@ -2,7 +2,9 @@ name: Code for Africa | Deploy | DEV on: push: - branches: [main] + branches: + - main + - chore/build-arm-image paths: - "apps/codeforafrica/**" - "Dockerfile" @@ -34,6 +36,10 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -66,6 +72,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/.github/workflows/pesayetu-deploy-dev.yml b/.github/workflows/pesayetu-deploy-dev.yml index a9a268c18e..a9f7c70aad 100644 --- a/.github/workflows/pesayetu-deploy-dev.yml +++ b/.github/workflows/pesayetu-deploy-dev.yml @@ -2,7 +2,9 @@ name: Pesayetu | Deploy | DEV on: push: - branches: [main] + branches: + - main + - chore/build-arm-image paths: - "apps/pesayetu/**" - "Dockerfile.pesayetu" @@ -34,6 +36,10 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -68,6 +74,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 push: true tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}" target: pesayetu-runner diff --git a/.github/workflows/roboshield-deploy-dev.yml b/.github/workflows/roboshield-deploy-dev.yml index 104f05e564..b2a0754ce0 100644 --- a/.github/workflows/roboshield-deploy-dev.yml +++ b/.github/workflows/roboshield-deploy-dev.yml @@ -2,7 +2,9 @@ name: RoboShield | Deploy | DEV on: push: - branches: [main] + branches: + - main + - chore/build-arm-image paths: - "apps/roboshield/**" - "Dockerfile" @@ -34,6 +36,10 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -65,6 +71,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" From 7dec0121ca85d03c7bddd290e60edaacdbdeecce Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Tue, 8 Oct 2024 21:40:47 +0300 Subject: [PATCH 05/31] fix: revert ARM image support --- .github/workflows/climatemappedafrica-deploy-dev.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/climatemappedafrica-deploy-dev.yml b/.github/workflows/climatemappedafrica-deploy-dev.yml index cd5ee3ca37..804cbaedea 100644 --- a/.github/workflows/climatemappedafrica-deploy-dev.yml +++ b/.github/workflows/climatemappedafrica-deploy-dev.yml @@ -2,9 +2,7 @@ name: Climate Mapped Africa | Deploy | DEV on: push: - branches: - - main - - chore/build-arm-image + branches: [main] paths: - "apps/climatemappedafrica/**" - "Dockerfile" @@ -35,10 +33,6 @@ jobs: with: fetch-depth: 0 - # Add support for more platforms with QEMU (optional) - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -64,7 +58,6 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 target: climatemappedafrica-runner push: true tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}" From 67504f69cdbb93339ed67bd034d1bf9b209bc6b5 Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Wed, 9 Oct 2024 10:00:10 +0300 Subject: [PATCH 06/31] fix: remove unwanted branch --- .github/workflows/charterafrica-deploy-dev.yml | 4 +--- .github/workflows/charterafrica-deploy-prod.yml | 4 ++++ .github/workflows/codeforafrica-deploy-dev.yml | 4 +--- .github/workflows/codeforafrica-deploy-prod.yml | 5 +++++ .github/workflows/pesayetu-deploy-dev.yml | 4 +--- .github/workflows/roboshield-deploy-dev.yml | 4 +--- .github/workflows/roboshield-deploy-prod.yml | 6 ++++++ 7 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/charterafrica-deploy-dev.yml b/.github/workflows/charterafrica-deploy-dev.yml index e762a1641b..989c3ce1a6 100644 --- a/.github/workflows/charterafrica-deploy-dev.yml +++ b/.github/workflows/charterafrica-deploy-dev.yml @@ -2,9 +2,7 @@ name: charterAFRICA | Deploy | DEV on: push: - branches: - - main - - chore/build-arm-image + branches: [main] paths: - "apps/charterafrica/**" - "Dockerfile" diff --git a/.github/workflows/charterafrica-deploy-prod.yml b/.github/workflows/charterafrica-deploy-prod.yml index 03fa6cb152..d2e83daf3e 100644 --- a/.github/workflows/charterafrica-deploy-prod.yml +++ b/.github/workflows/charterafrica-deploy-prod.yml @@ -30,6 +30,9 @@ jobs: with: fetch-depth: 0 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + # Set up Node since it's required by version-check # https://github.com/EndBug/version-check#github-workflow - name: Setup Node.js @@ -92,6 +95,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/.github/workflows/codeforafrica-deploy-dev.yml b/.github/workflows/codeforafrica-deploy-dev.yml index c84bba4042..9f6b28eb42 100644 --- a/.github/workflows/codeforafrica-deploy-dev.yml +++ b/.github/workflows/codeforafrica-deploy-dev.yml @@ -2,9 +2,7 @@ name: Code for Africa | Deploy | DEV on: push: - branches: - - main - - chore/build-arm-image + branches: [main] paths: - "apps/codeforafrica/**" - "Dockerfile" diff --git a/.github/workflows/codeforafrica-deploy-prod.yml b/.github/workflows/codeforafrica-deploy-prod.yml index 7be2dd21c2..3e500c526a 100644 --- a/.github/workflows/codeforafrica-deploy-prod.yml +++ b/.github/workflows/codeforafrica-deploy-prod.yml @@ -32,6 +32,10 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + # Set up Node since it's required by version-check # https://github.com/EndBug/version-check#github-workflow - name: Setup Node.js @@ -87,6 +91,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/.github/workflows/pesayetu-deploy-dev.yml b/.github/workflows/pesayetu-deploy-dev.yml index a9f7c70aad..de50bf7509 100644 --- a/.github/workflows/pesayetu-deploy-dev.yml +++ b/.github/workflows/pesayetu-deploy-dev.yml @@ -2,9 +2,7 @@ name: Pesayetu | Deploy | DEV on: push: - branches: - - main - - chore/build-arm-image + branches: [main] paths: - "apps/pesayetu/**" - "Dockerfile.pesayetu" diff --git a/.github/workflows/roboshield-deploy-dev.yml b/.github/workflows/roboshield-deploy-dev.yml index b2a0754ce0..11a50fc0a7 100644 --- a/.github/workflows/roboshield-deploy-dev.yml +++ b/.github/workflows/roboshield-deploy-dev.yml @@ -2,9 +2,7 @@ name: RoboShield | Deploy | DEV on: push: - branches: - - main - - chore/build-arm-image + branches: [main] paths: - "apps/roboshield/**" - "Dockerfile" diff --git a/.github/workflows/roboshield-deploy-prod.yml b/.github/workflows/roboshield-deploy-prod.yml index 1a96f8bd72..f4b0bd590d 100644 --- a/.github/workflows/roboshield-deploy-prod.yml +++ b/.github/workflows/roboshield-deploy-prod.yml @@ -30,6 +30,11 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Setup Node.js uses: actions/setup-node@v4 with: @@ -77,6 +82,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" From d464701f2e3ab26cf62e214fcff60785124d63f8 Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Wed, 9 Oct 2024 11:02:53 +0300 Subject: [PATCH 07/31] chore: add test branch --- .github/workflows/charterafrica-deploy-prod.yml | 4 ---- .github/workflows/codeforafrica-deploy-dev.yml | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/charterafrica-deploy-prod.yml b/.github/workflows/charterafrica-deploy-prod.yml index d2e83daf3e..03fa6cb152 100644 --- a/.github/workflows/charterafrica-deploy-prod.yml +++ b/.github/workflows/charterafrica-deploy-prod.yml @@ -30,9 +30,6 @@ jobs: with: fetch-depth: 0 - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - # Set up Node since it's required by version-check # https://github.com/EndBug/version-check#github-workflow - name: Setup Node.js @@ -95,7 +92,6 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/.github/workflows/codeforafrica-deploy-dev.yml b/.github/workflows/codeforafrica-deploy-dev.yml index 9f6b28eb42..c84bba4042 100644 --- a/.github/workflows/codeforafrica-deploy-dev.yml +++ b/.github/workflows/codeforafrica-deploy-dev.yml @@ -2,7 +2,9 @@ name: Code for Africa | Deploy | DEV on: push: - branches: [main] + branches: + - main + - chore/build-arm-image paths: - "apps/codeforafrica/**" - "Dockerfile" From 73fb2277253dd3a31f0b861b1a26cd0b97d045c1 Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Wed, 9 Oct 2024 11:35:16 +0300 Subject: [PATCH 08/31] chore: bump image version --- apps/codeforafrica/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/codeforafrica/package.json b/apps/codeforafrica/package.json index 7cd1afa604..d876d13437 100644 --- a/apps/codeforafrica/package.json +++ b/apps/codeforafrica/package.json @@ -1,6 +1,6 @@ { "name": "codeforafrica", - "version": "1.0.56", + "version": "1.0.57", "private": true, "author": "Code for Africa ", "description": "This is the main CFA site.", From 1237e01bc3ef12eeff8ec08d02bc9f5a2376037f Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Wed, 9 Oct 2024 12:03:54 +0300 Subject: [PATCH 09/31] chore: add test branch in prod workflow --- .github/workflows/codeforafrica-deploy-prod.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codeforafrica-deploy-prod.yml b/.github/workflows/codeforafrica-deploy-prod.yml index 3e500c526a..3073603fff 100644 --- a/.github/workflows/codeforafrica-deploy-prod.yml +++ b/.github/workflows/codeforafrica-deploy-prod.yml @@ -2,7 +2,9 @@ name: Code for Africa | Deploy | PROD on: push: - branches: [main] + branches: + - main + - chore/build-arm-image # This allows a subsequently queued workflow run to interrupt previous runs concurrency: From 1bd2fe84c625b717c3c9c44d98725f0777fb0c64 Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Wed, 9 Oct 2024 12:20:33 +0300 Subject: [PATCH 10/31] chore: bump codeforafrica to 1.0.58 --- apps/codeforafrica/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/codeforafrica/package.json b/apps/codeforafrica/package.json index d876d13437..1ce3618343 100644 --- a/apps/codeforafrica/package.json +++ b/apps/codeforafrica/package.json @@ -1,6 +1,6 @@ { "name": "codeforafrica", - "version": "1.0.57", + "version": "1.0.58", "private": true, "author": "Code for Africa ", "description": "This is the main CFA site.", From b5ce7c49fd0ef1f412d9e2598a41a041bc26c676 Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Wed, 9 Oct 2024 12:57:31 +0300 Subject: [PATCH 11/31] chore: bump charterafrica to 0.1.34 --- .github/workflows/charterafrica-deploy-dev.yml | 4 +++- .github/workflows/charterafrica-deploy-prod.yml | 5 ++++- apps/charterafrica/package.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/charterafrica-deploy-dev.yml b/.github/workflows/charterafrica-deploy-dev.yml index 989c3ce1a6..e762a1641b 100644 --- a/.github/workflows/charterafrica-deploy-dev.yml +++ b/.github/workflows/charterafrica-deploy-dev.yml @@ -2,7 +2,9 @@ name: charterAFRICA | Deploy | DEV on: push: - branches: [main] + branches: + - main + - chore/build-arm-image paths: - "apps/charterafrica/**" - "Dockerfile" diff --git a/.github/workflows/charterafrica-deploy-prod.yml b/.github/workflows/charterafrica-deploy-prod.yml index 03fa6cb152..4e2632913a 100644 --- a/.github/workflows/charterafrica-deploy-prod.yml +++ b/.github/workflows/charterafrica-deploy-prod.yml @@ -2,7 +2,9 @@ name: charterAFRICA | Deploy | PROD on: push: - branches: [main] + branches: + - main + - chore/build-arm-image # This allows a subsequently queued workflow run to interrupt previous runs concurrency: @@ -92,6 +94,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index ef297b0ce1..eaa44f4565 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -1,6 +1,6 @@ { "name": "charterafrica", - "version": "0.1.33", + "version": "0.1.34", "private": true, "author": "Code for Africa ", "description": "This is the official code for https://charter.africa site", From 6ad4a21191bb7cffd24e670c5445eb696af31982 Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Wed, 9 Oct 2024 14:31:35 +0300 Subject: [PATCH 12/31] chore: bump version in civicsignal, roboshield, vpnmanager --- .github/workflows/civicsignalblog-deploy-prod.yml | 4 +++- .github/workflows/roboshield-deploy-dev.yml | 5 ++++- .github/workflows/roboshield-deploy-prod.yml | 4 +++- .github/workflows/vpnmanager-deploy-dev.yml | 9 ++++++++- apps/civicsignalblog/package.json | 2 +- apps/roboshield/package.json | 2 +- apps/vpnmanager/package.json | 2 +- 7 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/civicsignalblog-deploy-prod.yml b/.github/workflows/civicsignalblog-deploy-prod.yml index e46bb6b77b..04d472ddb8 100644 --- a/.github/workflows/civicsignalblog-deploy-prod.yml +++ b/.github/workflows/civicsignalblog-deploy-prod.yml @@ -2,7 +2,9 @@ name: CivicSignal Blog | Deploy | PROD on: push: - branches: [main] + branches: + - main + - chore/build-arm-image # This allows a subsequently queued workflow run to interrupt previous runs concurrency: diff --git a/.github/workflows/roboshield-deploy-dev.yml b/.github/workflows/roboshield-deploy-dev.yml index 11a50fc0a7..043f896bc1 100644 --- a/.github/workflows/roboshield-deploy-dev.yml +++ b/.github/workflows/roboshield-deploy-dev.yml @@ -2,7 +2,10 @@ name: RoboShield | Deploy | DEV on: push: - branches: [main] + branches: + - main + - chore/build-arm-image + paths: - "apps/roboshield/**" - "Dockerfile" diff --git a/.github/workflows/roboshield-deploy-prod.yml b/.github/workflows/roboshield-deploy-prod.yml index f4b0bd590d..bbe908eba4 100644 --- a/.github/workflows/roboshield-deploy-prod.yml +++ b/.github/workflows/roboshield-deploy-prod.yml @@ -2,7 +2,9 @@ name: RoboShield | Deploy | PROD on: push: - branches: [main] + branches: + - main + - chore/build-arm-image concurrency: group: "${{ github.workflow }} @ ${{ github.ref }}" diff --git a/.github/workflows/vpnmanager-deploy-dev.yml b/.github/workflows/vpnmanager-deploy-dev.yml index a157f58d5f..696df5dc32 100644 --- a/.github/workflows/vpnmanager-deploy-dev.yml +++ b/.github/workflows/vpnmanager-deploy-dev.yml @@ -2,7 +2,9 @@ name: VPN Manager | Deploy | DEV on: push: - branches: [main] + branches: + - main + - chore/build-arm-image paths: - "apps/vpnmanager/**" - "Dockerfile.vpnmanager" @@ -31,6 +33,10 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -60,6 +66,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/apps/civicsignalblog/package.json b/apps/civicsignalblog/package.json index c6d764d710..2daef8d7d8 100644 --- a/apps/civicsignalblog/package.json +++ b/apps/civicsignalblog/package.json @@ -1,6 +1,6 @@ { "name": "civicsignalblog", - "version": "0.1.13", + "version": "0.1.14", "private": true, "author": "Code for Africa ", "description": "This is the (temporary) CivicSignal blog", diff --git a/apps/roboshield/package.json b/apps/roboshield/package.json index 5dc0e0f7e1..67223f6c94 100644 --- a/apps/roboshield/package.json +++ b/apps/roboshield/package.json @@ -1,6 +1,6 @@ { "name": "roboshield", - "version": "0.1.13", + "version": "0.1.14", "private": true, "scripts": { "build-server": "tsc --project tsconfig.server.json", diff --git a/apps/vpnmanager/package.json b/apps/vpnmanager/package.json index f28a9cb845..965b45f473 100644 --- a/apps/vpnmanager/package.json +++ b/apps/vpnmanager/package.json @@ -1,6 +1,6 @@ { "name": "vpnmanager", - "version": "0.1.0", + "version": "0.1.1", "private": true, "scripts": { "dev": "next dev", From 7db4b4433ef7daeb2932168e7d64c258fab8af0c Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Wed, 9 Oct 2024 22:51:45 +0300 Subject: [PATCH 13/31] chore: bump civicsignal blog version --- apps/civicsignalblog/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/civicsignalblog/package.json b/apps/civicsignalblog/package.json index 2daef8d7d8..65a05888d3 100644 --- a/apps/civicsignalblog/package.json +++ b/apps/civicsignalblog/package.json @@ -1,6 +1,6 @@ { "name": "civicsignalblog", - "version": "0.1.14", + "version": "0.1.15", "private": true, "author": "Code for Africa ", "description": "This is the (temporary) CivicSignal blog", From 4588fc73e5daed188be44f185beb6583ce77cd21 Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Fri, 11 Oct 2024 12:28:07 +0300 Subject: [PATCH 14/31] =?UTF-8?q?Bump=20civicsignalblog=20version:=200.1.1?= =?UTF-8?q?5=20=E2=86=92=20=200.1.16?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/civicsignalblog/contrib/dokku/Dockerfile | 2 +- apps/civicsignalblog/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/civicsignalblog/contrib/dokku/Dockerfile b/apps/civicsignalblog/contrib/dokku/Dockerfile index 9b020b5447..069d080723 100644 --- a/apps/civicsignalblog/contrib/dokku/Dockerfile +++ b/apps/civicsignalblog/contrib/dokku/Dockerfile @@ -1 +1 @@ -FROM codeforafrica/codeforafrica-ui:0.1.13 +FROM codeforafrica/codeforafrica-ui:0.1.16 diff --git a/apps/civicsignalblog/package.json b/apps/civicsignalblog/package.json index 0011bbb3ef..c839156387 100644 --- a/apps/civicsignalblog/package.json +++ b/apps/civicsignalblog/package.json @@ -1,6 +1,6 @@ { "name": "civicsignalblog", - "version": "0.1.15", + "version": "0.1.16", "private": true, "author": "Code for Africa ", "description": "This is the (temporary) CivicSignal blog", From 2c49d6f01d784cc58d42b8f6182166a7db3bc4d1 Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Mon, 14 Oct 2024 13:14:25 +0300 Subject: [PATCH 15/31] chore: add multiplatform support on climatemapped --- .github/workflows/climatemappedafrica-deploy-dev.yml | 9 ++++++++- apps/climatemappedafrica/package.json | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/climatemappedafrica-deploy-dev.yml b/.github/workflows/climatemappedafrica-deploy-dev.yml index 804cbaedea..cd5ee3ca37 100644 --- a/.github/workflows/climatemappedafrica-deploy-dev.yml +++ b/.github/workflows/climatemappedafrica-deploy-dev.yml @@ -2,7 +2,9 @@ name: Climate Mapped Africa | Deploy | DEV on: push: - branches: [main] + branches: + - main + - chore/build-arm-image paths: - "apps/climatemappedafrica/**" - "Dockerfile" @@ -33,6 +35,10 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -58,6 +64,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 target: climatemappedafrica-runner push: true tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}" diff --git a/apps/climatemappedafrica/package.json b/apps/climatemappedafrica/package.json index e5a2e3fd23..a9ff5f979e 100644 --- a/apps/climatemappedafrica/package.json +++ b/apps/climatemappedafrica/package.json @@ -1,6 +1,6 @@ { "name": "climatemappedafrica", - "version": "0.0.1", + "version": "0.0.2", "private": true, "author": "Code for Africa ", "description": "Climate Mapped Africa ", From 05eb1258119543794f458c5b2e747d29ad612be4 Mon Sep 17 00:00:00 2001 From: VinneyJ Date: Thu, 17 Oct 2024 09:29:51 +0300 Subject: [PATCH 16/31] chore:bump climatemapped to 0.0.4 --- apps/climatemappedafrica/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/climatemappedafrica/package.json b/apps/climatemappedafrica/package.json index 4f2310186f..50032687cb 100644 --- a/apps/climatemappedafrica/package.json +++ b/apps/climatemappedafrica/package.json @@ -1,6 +1,6 @@ { "name": "climatemappedafrica", - "version": "0.0.3", + "version": "0.0.4", "private": true, "author": "Code for Africa ", "description": "Climate Mapped Africa ", From 8767b03bbd83eb77826858ee3e8d95264e64552a Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 18 Feb 2025 11:22:35 +0300 Subject: [PATCH 17/31] Bump charterafrica UI version to 0.1.35 in Dockerfile and package.json --- apps/charterafrica/contrib/dokku/Dockerfile | 2 +- apps/charterafrica/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/charterafrica/contrib/dokku/Dockerfile b/apps/charterafrica/contrib/dokku/Dockerfile index fceb8357aa..2988ff6887 100644 --- a/apps/charterafrica/contrib/dokku/Dockerfile +++ b/apps/charterafrica/contrib/dokku/Dockerfile @@ -1 +1 @@ -FROM codeforafrica/charterafrica-ui:0.1.33 +FROM codeforafrica/charterafrica-ui:0.1.35 diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index 96b894ef52..e63a42b552 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -1,6 +1,6 @@ { "name": "charterafrica", - "version": "0.1.34", + "version": "0.1.35", "private": true, "author": "Code for Africa ", "description": "This is the official code for https://charter.africa site", From 7d5acd446428838694d3f26f0011a1a0108f0ffc Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Thu, 20 Feb 2025 14:29:03 +0300 Subject: [PATCH 18/31] Bump climatemapped-africa-ui version to 0.0.5 in Dockerfile and package.json --- apps/climatemappedafrica/contrib/dokku/Dockerfile | 2 +- apps/climatemappedafrica/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/climatemappedafrica/contrib/dokku/Dockerfile b/apps/climatemappedafrica/contrib/dokku/Dockerfile index 3c1919c5c2..947995d6c9 100644 --- a/apps/climatemappedafrica/contrib/dokku/Dockerfile +++ b/apps/climatemappedafrica/contrib/dokku/Dockerfile @@ -1 +1 @@ -FROM codeforafrica/climatemapped-africa-ui:0.0.1 +FROM codeforafrica/climatemapped-africa-ui:0.0.5 diff --git a/apps/climatemappedafrica/package.json b/apps/climatemappedafrica/package.json index bb09c7d366..e41212d4c2 100644 --- a/apps/climatemappedafrica/package.json +++ b/apps/climatemappedafrica/package.json @@ -1,6 +1,6 @@ { "name": "climatemappedafrica", - "version": "0.0.4", + "version": "0.0.5", "private": true, "author": "Code for Africa ", "description": "ClimateMapped Africa", From c8f2208deee71533d144da7add0fd19873847c5b Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 4 Mar 2025 14:54:55 +0300 Subject: [PATCH 19/31] bump package versions to 0.1.17, 1.0.59, and 0.1.15 --- apps/civicsignalblog/package.json | 2 +- apps/codeforafrica/package.json | 2 +- apps/roboshield/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/civicsignalblog/package.json b/apps/civicsignalblog/package.json index 494998d77d..9e8c00046b 100644 --- a/apps/civicsignalblog/package.json +++ b/apps/civicsignalblog/package.json @@ -1,6 +1,6 @@ { "name": "civicsignalblog", - "version": "0.1.16", + "version": "0.1.17", "private": true, "author": "Code for Africa ", "description": "This is the (temporary) CivicSignal blog", diff --git a/apps/codeforafrica/package.json b/apps/codeforafrica/package.json index 516958278b..a0243a86db 100644 --- a/apps/codeforafrica/package.json +++ b/apps/codeforafrica/package.json @@ -1,6 +1,6 @@ { "name": "codeforafrica", - "version": "1.0.58", + "version": "1.0.59", "private": true, "author": "Code for Africa ", "description": "This is the main CFA site.", diff --git a/apps/roboshield/package.json b/apps/roboshield/package.json index 132033c0fc..4fdc2adff4 100644 --- a/apps/roboshield/package.json +++ b/apps/roboshield/package.json @@ -1,6 +1,6 @@ { "name": "roboshield", - "version": "0.1.14", + "version": "0.1.15", "private": true, "scripts": { "build-server": "tsc --project tsconfig.server.json", From 3186a4862294e4f2f9a0496951596f27ba1a5f47 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 4 Mar 2025 15:17:24 +0300 Subject: [PATCH 20/31] fix: update import paths for CustomSelectComponent to include index --- .../src/payload/fields/customSelect/currentApp.js | 2 +- .../src/payload/fields/customSelect/defaultApp.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/civicsignalblog/src/payload/fields/customSelect/currentApp.js b/apps/civicsignalblog/src/payload/fields/customSelect/currentApp.js index e639217f97..7f2a68d284 100644 --- a/apps/civicsignalblog/src/payload/fields/customSelect/currentApp.js +++ b/apps/civicsignalblog/src/payload/fields/customSelect/currentApp.js @@ -1,4 +1,4 @@ -import CustomSelectComponent from "#civicsignalblog/payload/components/allowedAppSelect"; +import CustomSelectComponent from "#civicsignalblog/payload/components/allowedAppSelect/index"; const CurrentAppSelectField = { name: "currentApp", diff --git a/apps/civicsignalblog/src/payload/fields/customSelect/defaultApp.js b/apps/civicsignalblog/src/payload/fields/customSelect/defaultApp.js index 269822fef6..2ba2d669eb 100644 --- a/apps/civicsignalblog/src/payload/fields/customSelect/defaultApp.js +++ b/apps/civicsignalblog/src/payload/fields/customSelect/defaultApp.js @@ -1,4 +1,4 @@ -import CustomSelectComponent from "#civicsignalblog/payload/components/allowedAppSelect"; +import CustomSelectComponent from "#civicsignalblog/payload/components/allowedAppSelect/index"; const DefaultAppSelectField = { name: "defaultApp", From a5775417985256c1c1de8e02be732ba0a7065bb1 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 4 Mar 2025 15:43:19 +0300 Subject: [PATCH 21/31] Bump civicsignalblog --- apps/civicsignalblog/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/civicsignalblog/package.json b/apps/civicsignalblog/package.json index 9e8c00046b..5592f7d72d 100644 --- a/apps/civicsignalblog/package.json +++ b/apps/civicsignalblog/package.json @@ -1,6 +1,6 @@ { "name": "civicsignalblog", - "version": "0.1.17", + "version": "0.1.18", "private": true, "author": "Code for Africa ", "description": "This is the (temporary) CivicSignal blog", From b3a980a93e41332636728ff029a0828c306ba471 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Tue, 11 Mar 2025 12:09:40 +0300 Subject: [PATCH 22/31] Bump versions codeforafrica 1.0.61 & charter 1.0.35 --- apps/charterafrica/contrib/dokku/Dockerfile | 2 +- apps/charterafrica/package.json | 2 +- apps/codeforafrica/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/charterafrica/contrib/dokku/Dockerfile b/apps/charterafrica/contrib/dokku/Dockerfile index 2988ff6887..27ea3cbfca 100644 --- a/apps/charterafrica/contrib/dokku/Dockerfile +++ b/apps/charterafrica/contrib/dokku/Dockerfile @@ -1 +1 @@ -FROM codeforafrica/charterafrica-ui:0.1.35 +FROM codeforafrica/charterafrica-ui:0.1.36 diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index e63a42b552..da65033c29 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -1,6 +1,6 @@ { "name": "charterafrica", - "version": "0.1.35", + "version": "0.1.36", "private": true, "author": "Code for Africa ", "description": "This is the official code for https://charter.africa site", diff --git a/apps/codeforafrica/package.json b/apps/codeforafrica/package.json index a0243a86db..83e71dac86 100644 --- a/apps/codeforafrica/package.json +++ b/apps/codeforafrica/package.json @@ -1,6 +1,6 @@ { "name": "codeforafrica", - "version": "1.0.59", + "version": "1.0.61", "private": true, "author": "Code for Africa ", "description": "This is the main CFA site.", From 86e5446546c33e524b7202d6438da2237d6eb4b9 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Thu, 13 Mar 2025 12:40:22 +0300 Subject: [PATCH 23/31] Bump charterafrica version to 0.1.37 in Dockerfile and package.json --- apps/charterafrica/contrib/dokku/Dockerfile | 2 +- apps/charterafrica/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/charterafrica/contrib/dokku/Dockerfile b/apps/charterafrica/contrib/dokku/Dockerfile index 27ea3cbfca..a1848795a6 100644 --- a/apps/charterafrica/contrib/dokku/Dockerfile +++ b/apps/charterafrica/contrib/dokku/Dockerfile @@ -1 +1 @@ -FROM codeforafrica/charterafrica-ui:0.1.36 +FROM codeforafrica/charterafrica-ui:0.1.37 diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index da65033c29..27dc45f021 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -1,6 +1,6 @@ { "name": "charterafrica", - "version": "0.1.36", + "version": "0.1.37", "private": true, "author": "Code for Africa ", "description": "This is the official code for https://charter.africa site", From 1c33abaa9cfb48adf83a23317e510934ccdefd7e Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Mon, 24 Mar 2025 13:01:11 +0300 Subject: [PATCH 24/31] =?UTF-8?q?Bump=20civicsignalblog=20version:=200.1.1?= =?UTF-8?q?8=20=E2=86=92=20=200.1.19?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/civicsignalblog/contrib/dokku/Dockerfile | 2 +- apps/civicsignalblog/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/civicsignalblog/contrib/dokku/Dockerfile b/apps/civicsignalblog/contrib/dokku/Dockerfile index 069d080723..ab9d40e3b6 100644 --- a/apps/civicsignalblog/contrib/dokku/Dockerfile +++ b/apps/civicsignalblog/contrib/dokku/Dockerfile @@ -1 +1 @@ -FROM codeforafrica/codeforafrica-ui:0.1.16 +FROM codeforafrica/civicsignalblog-ui:0.1.19 diff --git a/apps/civicsignalblog/package.json b/apps/civicsignalblog/package.json index 5592f7d72d..79cec86012 100644 --- a/apps/civicsignalblog/package.json +++ b/apps/civicsignalblog/package.json @@ -1,6 +1,6 @@ { "name": "civicsignalblog", - "version": "0.1.18", + "version": "0.1.19", "private": true, "author": "Code for Africa ", "description": "This is the (temporary) CivicSignal blog", From 7f35794f5510d34984e961f486028d0bdfad7dc4 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Wed, 9 Apr 2025 08:52:27 +0300 Subject: [PATCH 25/31] bump version to 0.1.38 --- apps/charterafrica/contrib/dokku/Dockerfile | 2 +- apps/charterafrica/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/charterafrica/contrib/dokku/Dockerfile b/apps/charterafrica/contrib/dokku/Dockerfile index a1848795a6..95e97d318f 100644 --- a/apps/charterafrica/contrib/dokku/Dockerfile +++ b/apps/charterafrica/contrib/dokku/Dockerfile @@ -1 +1 @@ -FROM codeforafrica/charterafrica-ui:0.1.37 +FROM codeforafrica/charterafrica-ui:0.1.38 diff --git a/apps/charterafrica/package.json b/apps/charterafrica/package.json index 27dc45f021..7e47f13317 100644 --- a/apps/charterafrica/package.json +++ b/apps/charterafrica/package.json @@ -1,6 +1,6 @@ { "name": "charterafrica", - "version": "0.1.37", + "version": "0.1.38", "private": true, "author": "Code for Africa ", "description": "This is the official code for https://charter.africa site", From 0a69b80321fac99adfb786da4e5ee6796cb157d3 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Thu, 8 May 2025 16:49:29 +0300 Subject: [PATCH 26/31] Update Dockerfile and pnpm workspace for improved build process for roboshield and dependency upgrades --- Dockerfile | 24 +++++++----------------- pnpm-workspace.yaml | 32 ++++++++++++++++---------------- 2 files changed, 23 insertions(+), 33 deletions(-) diff --git a/Dockerfile b/Dockerfile index d49d0bfbe0..ec2e804169 100644 --- a/Dockerfile +++ b/Dockerfile @@ -702,11 +702,11 @@ COPY apps/roboshield ./apps/roboshield/ # When building Next.js app, Next.js needs to connect to local Payload ENV PAYLOAD_PUBLIC_APP_URL=http://localhost:3000 RUN --mount=type=secret,id=sentry_auth_token,env=SENTRY_AUTH_TOKEN \ - pnpm --filter "./apps/roboshield/" build-next + pnpm --filter "./apps/roboshield/" build # When building Payload app, Payload needs to have final app URL ENV PAYLOAD_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL} -RUN pnpm --filter "./apps/roboshield/" build-payload +# RUN pnpm --filter "./apps/roboshield/" build-payload # # roboshield-runner: final deployable image @@ -729,28 +729,18 @@ RUN set -ex \ COPY --from=roboshield-builder --chown=nextjs:nodejs /workspace/node_modules ./node_modules COPY --from=roboshield-builder --chown=nextjs:nodejs /workspace/apps/roboshield/next.config.js ./apps/roboshield/next.config.js COPY --from=roboshield-builder --chown=nextjs:nodejs /workspace/apps/roboshield/.env ./apps/roboshield/.env -# Since we can't use output: "standalone", copy all app's dependencies -COPY --from=roboshield-builder --chown=nextjs:nodejs /workspace/apps/roboshield/node_modules ./apps/roboshield/node_modules # Next.js # Public assets COPY --from=roboshield-builder --chown=nextjs:nodejs /workspace/apps/roboshield/public ./apps/roboshield/public - -# Since we can't use output: "standalone", copy the whole app's .next folder -# TODO(kilemensi): Figure out which files in .next folder are not needed -COPY --from=roboshield-builder --chown=nextjs:nodejs /workspace/apps/roboshield/.next ./apps/roboshield/.next - -# Payload -COPY --from=roboshield-builder /workspace/apps/roboshield/dist ./apps/roboshield/dist -COPY --from=roboshield-builder /workspace/apps/roboshield/build ./apps/roboshield/build - -# Since we can't use output: "standalone", switch to specific app's folder -WORKDIR /workspace/apps/roboshield +# Copy standalone output +COPY --from=roboshield-builder --chown=nextjs:nodejs /workspace/apps/roboshield/.next/standalone ./apps/roboshield +COPY --from=roboshield-builder --chown=nextjs:nodejs /workspace/apps/roboshield/.next/static ./apps/roboshield/.next/static USER nextjs # Custom server to run Payload and Next.js in the same app -CMD ["node", "dist/server.js"] +CMD ["node", "apps/roboshield/server.js"] # ============================================================================ @@ -986,7 +976,7 @@ CMD ["node", "apps/promisetracker/server.js"] # # twoopstracker-deps: image with all twoopstracker dependencies # --------------------------------------------------- - + FROM base-deps AS twoopstracker-deps COPY apps/twoopstracker/package.json ./apps/twoopstracker/package.json # Use virtual store: https://pnpm.io/cli/fetch#usage-scenario diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index d7442a4f14..0e47483cc4 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -222,19 +222,19 @@ catalogs: "@mui/private-theming": ^5.16.6 payload-v3: - payload: "3.34.0" - "@payloadcms/db-mongodb": "3.34.0" - "@payloadcms/live-preview-react": "3.34.0" - "@payloadcms/next": "3.34.0" - "@payloadcms/payload-cloud": "3.34.0" - "@payloadcms/plugin-form-builder": "3.34.0" - "@payloadcms/plugin-nested-docs": "3.34.0" - "@payloadcms/plugin-redirects": "3.34.0" - "@payloadcms/plugin-search": "3.34.0" - "@payloadcms/plugin-seo": "3.34.0" - "@payloadcms/richtext-slate": "3.34.0" - "@payloadcms/ui": "3.34.0" - "@payloadcms/plugin-sentry": "3.34.0" - "@payloadcms/plugin-cloud-storage": "3.34.0" - "@payloadcms/storage-s3": "3.34.0" - "@payloadcms/email-nodemailer": "3.34.0" + payload: "3.37.0" + "@payloadcms/db-mongodb": "3.37.0" + "@payloadcms/live-preview-react": "3.37.0" + "@payloadcms/next": "3.37.0" + "@payloadcms/payload-cloud": "3.37.0" + "@payloadcms/plugin-form-builder": "3.37.0" + "@payloadcms/plugin-nested-docs": "3.37.0" + "@payloadcms/plugin-redirects": "3.37.0" + "@payloadcms/plugin-search": "3.37.0" + "@payloadcms/plugin-seo": "3.37.0" + "@payloadcms/richtext-slate": "3.37.0" + "@payloadcms/ui": "3.37.0" + "@payloadcms/plugin-sentry": "3.37.0" + "@payloadcms/plugin-cloud-storage": "3.37.0" + "@payloadcms/storage-s3": "3.37.0" + "@payloadcms/email-nodemailer": "3.37.0" From b02bbae233f8a0d8e693663dd660c4b2891075a5 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Fri, 9 May 2025 09:38:47 +0300 Subject: [PATCH 27/31] Add index signature to PageProps interface for improved flexibility --- apps/roboshield/src/lib/data/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/roboshield/src/lib/data/index.ts b/apps/roboshield/src/lib/data/index.ts index 6c0d33040f..0bd43227a7 100644 --- a/apps/roboshield/src/lib/data/index.ts +++ b/apps/roboshield/src/lib/data/index.ts @@ -3,5 +3,6 @@ import { Page } from "@/root/payload-types"; export { getPageServerSideProps } from "./local"; export interface PageProps { + [key: string]: unknown; blocks: Page["blocks"]; } From 903da3082a0987860975f532e1e02f3893650c0a Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Fri, 9 May 2025 11:50:20 +0300 Subject: [PATCH 28/31] Fixed failing build --- .github/workflows/codeforafrica-deploy-review-app.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codeforafrica-deploy-review-app.yml b/.github/workflows/codeforafrica-deploy-review-app.yml index d4045028d3..ebb42bf6f9 100644 --- a/.github/workflows/codeforafrica-deploy-review-app.yml +++ b/.github/workflows/codeforafrica-deploy-review-app.yml @@ -66,6 +66,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/amd64,linux/arm64 target: codeforafrica-runner push: true tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}" From 73a953c926bf5cc920fef41287753306985f14b4 Mon Sep 17 00:00:00 2001 From: Kevin Koech Date: Mon, 12 May 2025 13:26:43 +0300 Subject: [PATCH 29/31] Remove 'chore/build-arm-image' branch from deployment triggers in workflow files --- .github/workflows/charterafrica-deploy-dev.yml | 1 - .github/workflows/charterafrica-deploy-prod.yml | 1 - .github/workflows/civicsignalblog-deploy-prod.yml | 1 - .github/workflows/climatemappedafrica-deploy-dev.yml | 1 - .github/workflows/codeforafrica-deploy-dev.yml | 1 - .github/workflows/codeforafrica-deploy-prod.yml | 1 - .github/workflows/roboshield-deploy-dev.yml | 1 - .github/workflows/roboshield-deploy-prod.yml | 1 - .github/workflows/vpnmanager-deploy-dev.yml | 2 +- 9 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/charterafrica-deploy-dev.yml b/.github/workflows/charterafrica-deploy-dev.yml index e762a1641b..927e9510b6 100644 --- a/.github/workflows/charterafrica-deploy-dev.yml +++ b/.github/workflows/charterafrica-deploy-dev.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - chore/build-arm-image paths: - "apps/charterafrica/**" - "Dockerfile" diff --git a/.github/workflows/charterafrica-deploy-prod.yml b/.github/workflows/charterafrica-deploy-prod.yml index 36894d3a1c..8cdbeb48b8 100644 --- a/.github/workflows/charterafrica-deploy-prod.yml +++ b/.github/workflows/charterafrica-deploy-prod.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - chore/build-arm-image # This allows a subsequently queued workflow run to interrupt previous runs concurrency: diff --git a/.github/workflows/civicsignalblog-deploy-prod.yml b/.github/workflows/civicsignalblog-deploy-prod.yml index 04d472ddb8..2ba514d38b 100644 --- a/.github/workflows/civicsignalblog-deploy-prod.yml +++ b/.github/workflows/civicsignalblog-deploy-prod.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - chore/build-arm-image # This allows a subsequently queued workflow run to interrupt previous runs concurrency: diff --git a/.github/workflows/climatemappedafrica-deploy-dev.yml b/.github/workflows/climatemappedafrica-deploy-dev.yml index f2d79e9cb4..62ec594708 100644 --- a/.github/workflows/climatemappedafrica-deploy-dev.yml +++ b/.github/workflows/climatemappedafrica-deploy-dev.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - chore/build-arm-image paths: - "apps/climatemappedafrica/**" - "Dockerfile" diff --git a/.github/workflows/codeforafrica-deploy-dev.yml b/.github/workflows/codeforafrica-deploy-dev.yml index c84bba4042..6605910d4f 100644 --- a/.github/workflows/codeforafrica-deploy-dev.yml +++ b/.github/workflows/codeforafrica-deploy-dev.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - chore/build-arm-image paths: - "apps/codeforafrica/**" - "Dockerfile" diff --git a/.github/workflows/codeforafrica-deploy-prod.yml b/.github/workflows/codeforafrica-deploy-prod.yml index 3073603fff..eab3144679 100644 --- a/.github/workflows/codeforafrica-deploy-prod.yml +++ b/.github/workflows/codeforafrica-deploy-prod.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - chore/build-arm-image # This allows a subsequently queued workflow run to interrupt previous runs concurrency: diff --git a/.github/workflows/roboshield-deploy-dev.yml b/.github/workflows/roboshield-deploy-dev.yml index 043f896bc1..d5d570027b 100644 --- a/.github/workflows/roboshield-deploy-dev.yml +++ b/.github/workflows/roboshield-deploy-dev.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - chore/build-arm-image paths: - "apps/roboshield/**" diff --git a/.github/workflows/roboshield-deploy-prod.yml b/.github/workflows/roboshield-deploy-prod.yml index bbe908eba4..0796e227bd 100644 --- a/.github/workflows/roboshield-deploy-prod.yml +++ b/.github/workflows/roboshield-deploy-prod.yml @@ -4,7 +4,6 @@ on: push: branches: - main - - chore/build-arm-image concurrency: group: "${{ github.workflow }} @ ${{ github.ref }}" diff --git a/.github/workflows/vpnmanager-deploy-dev.yml b/.github/workflows/vpnmanager-deploy-dev.yml index 87ae533a08..beffd9df02 100644 --- a/.github/workflows/vpnmanager-deploy-dev.yml +++ b/.github/workflows/vpnmanager-deploy-dev.yml @@ -4,7 +4,7 @@ on: push: branches: - main - - chore/build-arm-image + paths: - "apps/vpnmanager/**" - "Dockerfile.vpnmanager" From 81c0500edf8675f86fde0e155b26944f7082f7d3 Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Thu, 29 May 2025 09:50:09 +0300 Subject: [PATCH 30/31] Switch to just linux/arm64 where possible --- .github/workflows/build-docker-image.yml | 7 ++++++- .github/workflows/charterafrica-deploy-dev.yml | 2 +- .github/workflows/charterafrica-deploy-prod.yml | 3 ++- .github/workflows/civicsignalblog-deploy-prod.yml | 2 +- .github/workflows/climatemappedafrica-deploy-dev.yml | 2 +- .github/workflows/codeforafrica-deploy-dev.yml | 2 +- .github/workflows/codeforafrica-deploy-prod.yml | 2 +- .github/workflows/codeforafrica-deploy-review-app.yml | 2 +- .github/workflows/pesayetu-deploy-dev.yml | 2 +- .github/workflows/roboshield-deploy-dev.yml | 2 +- .github/workflows/roboshield-deploy-prod.yml | 2 +- .github/workflows/trustlab-deploy-dev.yml | 5 +++++ .github/workflows/twoopstracker-deploy-dev.yml | 5 +++++ .github/workflows/vpnmanager-deploy-dev.yml | 2 +- 14 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index e05877125c..a780885588 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -30,6 +30,10 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -57,9 +61,10 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - target: ${{ inputs.target }} + platforms: linux/arm64 push: true tags: ${{ inputs.tags }} + target: ${{ inputs.target }} # Temp fix # https://github.com/docker/build-push-action/issues/252 diff --git a/.github/workflows/charterafrica-deploy-dev.yml b/.github/workflows/charterafrica-deploy-dev.yml index 991ef720f5..7ddba33c54 100644 --- a/.github/workflows/charterafrica-deploy-dev.yml +++ b/.github/workflows/charterafrica-deploy-dev.yml @@ -68,7 +68,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/.github/workflows/charterafrica-deploy-prod.yml b/.github/workflows/charterafrica-deploy-prod.yml index 3e08f24217..2b2e7b534f 100644 --- a/.github/workflows/charterafrica-deploy-prod.yml +++ b/.github/workflows/charterafrica-deploy-prod.yml @@ -92,7 +92,8 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 + # TODO(xavier): Follow up if we can switch this to arm64 + platforms: linux/amd64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/.github/workflows/civicsignalblog-deploy-prod.yml b/.github/workflows/civicsignalblog-deploy-prod.yml index 558f5f82ff..4dacf33c1e 100644 --- a/.github/workflows/civicsignalblog-deploy-prod.yml +++ b/.github/workflows/civicsignalblog-deploy-prod.yml @@ -89,7 +89,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/.github/workflows/climatemappedafrica-deploy-dev.yml b/.github/workflows/climatemappedafrica-deploy-dev.yml index ac3b582a34..9a27c3f219 100644 --- a/.github/workflows/climatemappedafrica-deploy-dev.yml +++ b/.github/workflows/climatemappedafrica-deploy-dev.yml @@ -65,7 +65,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 target: climatemappedafrica-runner push: true tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}" diff --git a/.github/workflows/codeforafrica-deploy-dev.yml b/.github/workflows/codeforafrica-deploy-dev.yml index 0266220453..ba7006bb26 100644 --- a/.github/workflows/codeforafrica-deploy-dev.yml +++ b/.github/workflows/codeforafrica-deploy-dev.yml @@ -71,7 +71,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/.github/workflows/codeforafrica-deploy-prod.yml b/.github/workflows/codeforafrica-deploy-prod.yml index 170b742243..1051ba6769 100644 --- a/.github/workflows/codeforafrica-deploy-prod.yml +++ b/.github/workflows/codeforafrica-deploy-prod.yml @@ -92,7 +92,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/.github/workflows/codeforafrica-deploy-review-app.yml b/.github/workflows/codeforafrica-deploy-review-app.yml index 3bb7da0ccd..8b1c5a09bd 100644 --- a/.github/workflows/codeforafrica-deploy-review-app.yml +++ b/.github/workflows/codeforafrica-deploy-review-app.yml @@ -66,7 +66,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 target: codeforafrica-runner push: true tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}" diff --git a/.github/workflows/pesayetu-deploy-dev.yml b/.github/workflows/pesayetu-deploy-dev.yml index ce6eabb069..a694488d07 100644 --- a/.github/workflows/pesayetu-deploy-dev.yml +++ b/.github/workflows/pesayetu-deploy-dev.yml @@ -72,7 +72,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 push: true tags: "${{ env.IMAGE_NAME }}:${{ github.sha }}" target: pesayetu-runner diff --git a/.github/workflows/roboshield-deploy-dev.yml b/.github/workflows/roboshield-deploy-dev.yml index 2494b93e1f..1390e80ab5 100644 --- a/.github/workflows/roboshield-deploy-dev.yml +++ b/.github/workflows/roboshield-deploy-dev.yml @@ -71,7 +71,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/.github/workflows/roboshield-deploy-prod.yml b/.github/workflows/roboshield-deploy-prod.yml index 99fe8bb20e..277e049fa3 100644 --- a/.github/workflows/roboshield-deploy-prod.yml +++ b/.github/workflows/roboshield-deploy-prod.yml @@ -83,7 +83,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/.github/workflows/trustlab-deploy-dev.yml b/.github/workflows/trustlab-deploy-dev.yml index 7e7bf45dd7..d9a6aca86c 100644 --- a/.github/workflows/trustlab-deploy-dev.yml +++ b/.github/workflows/trustlab-deploy-dev.yml @@ -34,6 +34,10 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -65,6 +69,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/arm64 push: true secrets: | "mongo_url=${{ secrets.TRUSTLAB_MONGO_URL }}" diff --git a/.github/workflows/twoopstracker-deploy-dev.yml b/.github/workflows/twoopstracker-deploy-dev.yml index 5a8fb139de..6ddc655f49 100644 --- a/.github/workflows/twoopstracker-deploy-dev.yml +++ b/.github/workflows/twoopstracker-deploy-dev.yml @@ -37,6 +37,10 @@ jobs: with: fetch-depth: 0 + # Add support for more platforms with QEMU (optional) + - name: Set up QEMU + uses: docker/setup-qemu-action@v + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -62,6 +66,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . + platforms: linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" diff --git a/.github/workflows/vpnmanager-deploy-dev.yml b/.github/workflows/vpnmanager-deploy-dev.yml index 2c40e001db..f43ad833cd 100644 --- a/.github/workflows/vpnmanager-deploy-dev.yml +++ b/.github/workflows/vpnmanager-deploy-dev.yml @@ -66,7 +66,7 @@ jobs: cache-from: type=local,src=/tmp/.buildx-cache cache-to: type=local,dest=/tmp/.buildx-cache-new context: . - platforms: linux/amd64,linux/arm64 + platforms: linux/arm64 push: true secrets: | "sentry_auth_token=${{ secrets.SENTRY_AUTH_TOKEN }}" From 0188f8d638406cb003d9b4d0f1513c11858623d3 Mon Sep 17 00:00:00 2001 From: Clemence Kyara Date: Thu, 29 May 2025 10:12:48 +0300 Subject: [PATCH 31/31] Fix format and lint errors --- apps/climatemappedafrica/src/payload/fields/HURUmapURL.js | 4 +++- apps/pesayetu/src/lib/wordpress/connector.js | 8 ++++++-- apps/promisetracker/src/components/FormDialog/Form.js | 8 ++++++-- .../src/components/FormDialog/UpdateForm.js | 8 ++++++-- apps/promisetracker/src/pages/act-now.page.js | 4 +++- apps/promisetracker/src/pages/login.page.js | 4 +++- apps/promisetracker/src/utils/auth/error-list.js | 5 ++++- apps/techlabblog/.env | 3 +++ packages/hurumap-next/src/Map/utils.js | 8 ++++++-- 9 files changed, 40 insertions(+), 12 deletions(-) create mode 100644 apps/techlabblog/.env diff --git a/apps/climatemappedafrica/src/payload/fields/HURUmapURL.js b/apps/climatemappedafrica/src/payload/fields/HURUmapURL.js index 666b9a20ae..99f40d6891 100644 --- a/apps/climatemappedafrica/src/payload/fields/HURUmapURL.js +++ b/apps/climatemappedafrica/src/payload/fields/HURUmapURL.js @@ -22,7 +22,9 @@ function HURUmapURL(props) { const { urlValid } = reduceFieldsToValues(formFields, true); const validateURL = async () => { - if (!value) return; + if (!value) { + return; + } setLoading(true); try { // For now we can use the profiles endpoint to check if the URL is valid diff --git a/apps/pesayetu/src/lib/wordpress/connector.js b/apps/pesayetu/src/lib/wordpress/connector.js index 6d40722871..8d7db3e1a8 100644 --- a/apps/pesayetu/src/lib/wordpress/connector.js +++ b/apps/pesayetu/src/lib/wordpress/connector.js @@ -53,10 +53,14 @@ export function initializeWpApollo(initialState = null) { const newApolloClient = initializeApollo(singletonApolloClient, initialState); // For SSG and SSR always create a new Apollo Client. - if (typeof window === "undefined") return newApolloClient; + if (typeof window === "undefined") { + return newApolloClient; + } // Create the Apollo Client once in the client. - if (!wpApolloClient) wpApolloClient = newApolloClient; + if (!wpApolloClient) { + wpApolloClient = newApolloClient; + } return newApolloClient; } diff --git a/apps/promisetracker/src/components/FormDialog/Form.js b/apps/promisetracker/src/components/FormDialog/Form.js index 9a8072d01f..cba96f3334 100644 --- a/apps/promisetracker/src/components/FormDialog/Form.js +++ b/apps/promisetracker/src/components/FormDialog/Form.js @@ -63,7 +63,9 @@ function Form({ const onFileChange = (e) => { const file = URL.createObjectURL(e.target.files[0]); const fileSize = e.target.files[0].size; - if (handleFileValidation(fileSize)) return; + if (handleFileValidation(fileSize)) { + return; + } const reader = new FileReader(); reader.onload = function loadFiles(readerEvt) { @@ -93,7 +95,9 @@ function Form({ const { files } = dt; [...files].forEach((file) => { - if (handleFileValidation(file.size)) return; + if (handleFileValidation(file.size)) { + return; + } // Get URL of image file to be used for thumbnail preview const reader = new FileReader(); diff --git a/apps/promisetracker/src/components/FormDialog/UpdateForm.js b/apps/promisetracker/src/components/FormDialog/UpdateForm.js index 2c8833242a..500ac370ba 100644 --- a/apps/promisetracker/src/components/FormDialog/UpdateForm.js +++ b/apps/promisetracker/src/components/FormDialog/UpdateForm.js @@ -58,7 +58,9 @@ function Form({ promise_act_now: promiseActNow = { update: {} }, ...props }) { const file = URL.createObjectURL(e.target.files[0]); const fileSize = e.target.files[0].size; - if (handleFileValidation(fileSize)) return; + if (handleFileValidation(fileSize)) { + return; + } setImages([file]); }; @@ -78,7 +80,9 @@ function Form({ promise_act_now: promiseActNow = { update: {} }, ...props }) { const { files } = dt; [...files].forEach((file) => { - if (handleFileValidation(file.size)) return; + if (handleFileValidation(file.size)) { + return; + } // Get URL of image file to be used for thumbnail preview const reader = new FileReader(); diff --git a/apps/promisetracker/src/pages/act-now.page.js b/apps/promisetracker/src/pages/act-now.page.js index 1870bb1332..d5578f8613 100644 --- a/apps/promisetracker/src/pages/act-now.page.js +++ b/apps/promisetracker/src/pages/act-now.page.js @@ -37,7 +37,9 @@ function ActNow({ ...props }) { }, [session]); // When rendering client side don't display anything until loading is complete - if (typeof window !== "undefined" && status === "loading") return null; + if (typeof window !== "undefined" && status === "loading") { + return null; + } // If no session exists, show default landing page if (!session) { diff --git a/apps/promisetracker/src/pages/login.page.js b/apps/promisetracker/src/pages/login.page.js index ade1c245a9..4f3ce0f46a 100644 --- a/apps/promisetracker/src/pages/login.page.js +++ b/apps/promisetracker/src/pages/login.page.js @@ -41,7 +41,9 @@ function Login({ providers: providersProp, ...props }) { }, [session]); // When rendering client side don't display anything until loading is complete - if (typeof window !== "undefined" && status === "loading") return null; + if (typeof window !== "undefined" && status === "loading") { + return null; + } return ( { - if (mapType !== "choropleth") return null; + if (mapType !== "choropleth") { + return null; + } const filteredLocations = locations.filter(({ count }) => count !== null); const counts = filteredLocations.map(({ count }) => count); @@ -112,7 +114,9 @@ export const generateChoropleth = (choroplethProps, locations, mapType) => { ); const getColor = (count) => { - if (count === 0) return zeroColor; + if (count === 0) { + return zeroColor; + } const colorRange = count > 0 ? positiveColorRange : negativeColorRange; const thresholds = count > 0 ? positiveThresholds : negativeThresholds; const index = thresholds.findIndex(