From 95a394307144184c6ab84eae437436d17aed19eb Mon Sep 17 00:00:00 2001 From: Esanim <17294241+Esanim@users.noreply.github.com> Date: Tue, 21 Nov 2023 13:06:34 +0100 Subject: [PATCH 1/5] use gha cache --- .github/workflows/publish-tag-images.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish-tag-images.yml b/.github/workflows/publish-tag-images.yml index 3a1ea3283e..b966ecbd01 100644 --- a/.github/workflows/publish-tag-images.yml +++ b/.github/workflows/publish-tag-images.yml @@ -1,6 +1,6 @@ name: Publish Docker tag images -on: +on: push: tags: - 'v[0-9]+.[0-9]+.[0-9]+' @@ -13,12 +13,12 @@ env: jobs: build-docker: permissions: - contents: "read" - id-token: "write" + contents: 'read' + id-token: 'write' runs-on: ubuntu-latest steps: - name: Checkout ${{ inputs.sha }} - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup buildx uses: docker/setup-buildx-action@v2 @@ -27,9 +27,9 @@ jobs: id: gcpauth uses: google-github-actions/auth@v1 with: - create_credentials_file: "true" - workload_identity_provider: "projects/311968610280/locations/global/workloadIdentityPools/github/providers/github" - service_account: "artifact-deployer@lks-lz-management.iam.gserviceaccount.com" + create_credentials_file: 'true' + workload_identity_provider: 'projects/311968610280/locations/global/workloadIdentityPools/github/providers/github' + service_account: 'artifact-deployer@lks-lz-management.iam.gserviceaccount.com' - name: login run: |- @@ -40,7 +40,8 @@ jobs: with: context: . file: ./Dockerfile - push: true + push: false + cache-from: type=gha tags: | ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:${{ github.ref_name }} ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:latest From 75c58e271cfc40ed59e662bb6275cd8ca06ef923 Mon Sep 17 00:00:00 2001 From: Wolmin Date: Tue, 21 Nov 2023 14:10:59 +0100 Subject: [PATCH 2/5] Test on branch PR --- .github/workflows/publish-tag-images.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-tag-images.yml b/.github/workflows/publish-tag-images.yml index b966ecbd01..a323ee6f48 100644 --- a/.github/workflows/publish-tag-images.yml +++ b/.github/workflows/publish-tag-images.yml @@ -5,6 +5,8 @@ on: tags: - 'v[0-9]+.[0-9]+.[0-9]+' - 'v[0-9].[0-9].[0-9]-testnet' + branches: + - 'use-ga-cache' env: DOCKER_REGISTRY: europe-docker.pkg.dev @@ -43,5 +45,5 @@ jobs: push: false cache-from: type=gha tags: | - ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:${{ github.ref_name }} + ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:v1.7.3-test ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}:latest From 8b3c2dcbbaeff49b5a99cd138b2e9a794286a9a5 Mon Sep 17 00:00:00 2001 From: Esanim <17294241+Esanim@users.noreply.github.com> Date: Tue, 21 Nov 2023 14:26:26 +0100 Subject: [PATCH 3/5] enable public source maps --- next.config.js | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/next.config.js b/next.config.js index 521d101a06..fecad5e0c9 100644 --- a/next.config.js +++ b/next.config.js @@ -13,22 +13,20 @@ const moduleExports = { 'swagger-ui-react', ], reactStrictMode: true, - webpack(config, { webpack }) { + webpack(config, {webpack}) { config.plugins.push( new webpack.DefinePlugin({ __SENTRY_DEBUG__: false, __SENTRY_TRACING__: false, - }), - ); - config.module.rules.push( - { - test: /\.svg$/, - use: [ '@svgr/webpack' ], - }, - ); - config.resolve.fallback = { fs: false, net: false, tls: false }; + }) + ) + config.module.rules.push({ + test: /\.svg$/, + use: ['@svgr/webpack'], + }) + config.resolve.fallback = {fs: false, net: false, tls: false} - return config; + return config }, // NOTE: all config functions should be static and not depend on any environment variables // since all variables will be passed to the app only at runtime and there is now way to change Next.js config at this time @@ -38,7 +36,7 @@ const moduleExports = { redirects, headers, output: 'standalone', - productionBrowserSourceMaps: process.env.GENERATE_SOURCEMAPS === 'true', -}; + productionBrowserSourceMaps: true, +} module.exports = withRoutes(moduleExports); From 2862880867b7b04068bfe4747b8ffbf059efda8f Mon Sep 17 00:00:00 2001 From: Esanim <17294241+Esanim@users.noreply.github.com> Date: Tue, 21 Nov 2023 14:28:19 +0100 Subject: [PATCH 4/5] enable public source maps --- next.config.js | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/next.config.js b/next.config.js index fecad5e0c9..d0b61e4715 100644 --- a/next.config.js +++ b/next.config.js @@ -13,20 +13,22 @@ const moduleExports = { 'swagger-ui-react', ], reactStrictMode: true, - webpack(config, {webpack}) { + webpack(config, { webpack }) { config.plugins.push( new webpack.DefinePlugin({ __SENTRY_DEBUG__: false, __SENTRY_TRACING__: false, - }) - ) - config.module.rules.push({ - test: /\.svg$/, - use: ['@svgr/webpack'], - }) - config.resolve.fallback = {fs: false, net: false, tls: false} + }), + ); + config.module.rules.push( + { + test: /\.svg$/, + use: [ '@svgr/webpack' ], + }, + ); + config.resolve.fallback = { fs: false, net: false, tls: false }; - return config + return config; }, // NOTE: all config functions should be static and not depend on any environment variables // since all variables will be passed to the app only at runtime and there is now way to change Next.js config at this time @@ -36,7 +38,7 @@ const moduleExports = { redirects, headers, output: 'standalone', - productionBrowserSourceMaps: true, -} + productionBrowserSourceMaps: true +}; module.exports = withRoutes(moduleExports); From 68285dcc2b3bb13c530c1db7922adede48f2f1f2 Mon Sep 17 00:00:00 2001 From: Esanim <17294241+Esanim@users.noreply.github.com> Date: Tue, 21 Nov 2023 14:38:01 +0100 Subject: [PATCH 5/5] try again --- next.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/next.config.js b/next.config.js index d0b61e4715..9ce5f0e4bd 100644 --- a/next.config.js +++ b/next.config.js @@ -38,7 +38,7 @@ const moduleExports = { redirects, headers, output: 'standalone', - productionBrowserSourceMaps: true + productionBrowserSourceMaps: true, }; module.exports = withRoutes(moduleExports);