From e2e17d921b9b1b33ce3bbf7180e0915bece2843a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Placzy=C5=84ski?= Date: Mon, 15 Jul 2024 13:48:39 +0200 Subject: [PATCH] Update resync workflow to align with deployment workflow configuration Added new inputs and environment variables to the resync workflow to reflect the configuration used in the deployment workflow. This includes enabling the proposal discussion forum, forcing rebuild of Docker images, and additional environment variables for Grafana, Google Analytics, and Sentry integrations. This ensures consistency between workflows and supports a smooth update process for Cardano Node and DB Sync versions in various environments. --- .../resync-cardano-node-and-db-sync.yml | 40 ++++++++++++++----- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/.github/workflows/resync-cardano-node-and-db-sync.yml b/.github/workflows/resync-cardano-node-and-db-sync.yml index 1cb7c567d..12dcc19af 100644 --- a/.github/workflows/resync-cardano-node-and-db-sync.yml +++ b/.github/workflows/resync-cardano-node-and-db-sync.yml @@ -13,10 +13,27 @@ on: - "test" - "staging" - "beta" + isProposalDiscussionForumEnabled: + description: "Enable proposal discussion forum" + required: true + type: choice + default: "disabled" + options: + - "enabled" + - "disabled" + forceRebuildDockerImages: + description: "Force rebuild the docker images" + required: false + type: choice + default: "false" + options: + - "true" + - "false" env: ENVIRONMENT: ${{ inputs.environment || 'dev' }} CARDANO_NETWORK: "sanchonet" + FORCE_REBUILD: ${{inputs.forceRebuildDockerImages == 'true'}} jobs: deploy: @@ -27,22 +44,27 @@ jobs: working-directory: ./scripts/govtool env: DBSYNC_POSTGRES_DB: "cexplorer" - DBSYNC_POSTGRES_USER: "postgres" DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb" + DBSYNC_POSTGRES_USER: "postgres" + GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }} + GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }} GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }} - GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }} - DEV_NGINX_BASIC_AUTH: ${{ secrets.DEV_NGINX_BASIC_AUTH }} - TEST_NGINX_BASIC_AUTH: ${{ secrets.TEST_NGINX_BASIC_AUTH }} - STAGING_NGINX_BASIC_AUTH: ${{ secrets.STAGING_NGINX_BASIC_AUTH }} - SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} - TRAEFIK_LE_EMAIL: "admin+govtool@binarapps.com" + GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }} GTM_ID: ${{ secrets.GTM_ID }} NPMRC_TOKEN: ${{ secrets.NPMRC_TOKEN }} - SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} - PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }} IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }} + NEXT_PUBLIC_API_URL: "https://participation.sanchogov.tools" + NEXT_PUBLIC_GA4_PROPERTY_ID: ${{ secrets.NEXT_PUBLIC_GA4_PROPERTY_ID }} + DEV_NGINX_BASIC_AUTH: ${{ secrets.DEV_NGINX_BASIC_AUTH }} + PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} + SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }} + SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }} + SENTRY_IGNORE_API_RESOLUTION_ERROR: "1" + TRAEFIK_LE_EMAIL: "admin+govtool@binarapps.com" + USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }} + IS_PROPOSAL_DISCUSSION_FORUM_ENABLED: ${{ inputs.isProposalDiscussionForumEnabled == 'enabled' }} steps: - name: Checkout code uses: actions/checkout@v3