From 0c081c24d13393cc35cb22267aefe3c0ea28bda2 Mon Sep 17 00:00:00 2001 From: Eshanchik <39962460+Eshanchik@users.noreply.github.com> Date: Tue, 9 Jan 2024 12:23:50 +0200 Subject: [PATCH 1/4] Update upload_config_dev.yml --- .github/workflows/upload_config_dev.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/upload_config_dev.yml b/.github/workflows/upload_config_dev.yml index 69d1c37a..637f455f 100644 --- a/.github/workflows/upload_config_dev.yml +++ b/.github/workflows/upload_config_dev.yml @@ -22,10 +22,14 @@ jobs: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-2 + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_NEW }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_NEW }} + aws-region: us-east-1 + + - name: Extract bucket name + id: extract_bucket + run: echo "::set-output name=bucket_name::$(aws s3 ls | grep bridge-config-dev | awk '{print $3}')" - name: Upload config run: | - aws s3 cp contracts/configs/dev.json s3://bridge-config.ambrosus-dev.io/index.html --content-type application/json --cache-control no-cache + aws s3 cp contracts/configs/dev.json s3://${{ steps.extract_bucket.outputs.bucket_name }}/index.html --content-type application/json --cache-control no-cache From 2492bfa6e2903c17c57306c3dada01b347af6ae9 Mon Sep 17 00:00:00 2001 From: Eshanchik <39962460+Eshanchik@users.noreply.github.com> Date: Tue, 9 Jan 2024 12:24:38 +0200 Subject: [PATCH 2/4] Update upload_config_test.yml --- .github/workflows/upload_config_test.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/upload_config_test.yml b/.github/workflows/upload_config_test.yml index 015da58c..dc1211d1 100644 --- a/.github/workflows/upload_config_test.yml +++ b/.github/workflows/upload_config_test.yml @@ -10,7 +10,7 @@ on: - 'contracts/configs/test.json' jobs: - upload_chainspec_testnet: + upload_chainspec_devnet: runs-on: ubuntu-latest steps: @@ -22,10 +22,14 @@ jobs: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-2 + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_NEW }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_NEW }} + aws-region: us-east-1 + + - name: Extract bucket name + id: extract_bucket + run: echo "::set-output name=bucket_name::$(aws s3 ls | grep bridge-config-test | awk '{print $3}')" - name: Upload config run: | - aws s3 cp contracts/configs/test.json s3://bridge-config.ambrosus-test.io/index.html --content-type application/json --cache-control no-cache + aws s3 cp contracts/configs/test.json s3://${{ steps.extract_bucket.outputs.bucket_name }}/index.html --content-type application/json --cache-control no-cache From 0438b1eba2034dd7468352a6cd8bab124e4c9ccb Mon Sep 17 00:00:00 2001 From: Eshanchik <39962460+Eshanchik@users.noreply.github.com> Date: Tue, 9 Jan 2024 12:25:13 +0200 Subject: [PATCH 3/4] Update upload_config_prod.yml --- .github/workflows/upload_config_prod.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/upload_config_prod.yml b/.github/workflows/upload_config_prod.yml index 4d6e3370..92ed4506 100644 --- a/.github/workflows/upload_config_prod.yml +++ b/.github/workflows/upload_config_prod.yml @@ -4,12 +4,13 @@ on: workflow_dispatch: push: branches: + - dev - main paths: - - 'contracts/configs/main.json' + - 'contracts/configs/prod.json' jobs: - upload_chainspec_mainnet: + upload_chainspec_devnet: runs-on: ubuntu-latest steps: @@ -21,10 +22,14 @@ jobs: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-2 + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_NEW }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_NEW }} + aws-region: us-east-1 + + - name: Extract bucket name + id: extract_bucket + run: echo "::set-output name=bucket_name::$(aws s3 ls | grep bridge-config-prod | awk '{print $3}')" - name: Upload config run: | - aws s3 cp contracts/configs/main.json s3://bridge-config.ambrosus.io/index.html --content-type application/json --cache-control no-cache + aws s3 cp contracts/configs/prod.json s3://${{ steps.extract_bucket.outputs.bucket_name }}/index.html --content-type application/json --cache-control no-cache From 5e28f9260795c1010cdaee3d602630ff88f74526 Mon Sep 17 00:00:00 2001 From: Eshanchik <39962460+Eshanchik@users.noreply.github.com> Date: Tue, 9 Jan 2024 12:26:08 +0200 Subject: [PATCH 4/4] Update upload_config_prod.yml --- .github/workflows/upload_config_prod.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload_config_prod.yml b/.github/workflows/upload_config_prod.yml index 92ed4506..dc8d9ce0 100644 --- a/.github/workflows/upload_config_prod.yml +++ b/.github/workflows/upload_config_prod.yml @@ -7,7 +7,7 @@ on: - dev - main paths: - - 'contracts/configs/prod.json' + - 'contracts/configs/main.json' jobs: upload_chainspec_devnet: @@ -32,4 +32,4 @@ jobs: - name: Upload config run: | - aws s3 cp contracts/configs/prod.json s3://${{ steps.extract_bucket.outputs.bucket_name }}/index.html --content-type application/json --cache-control no-cache + aws s3 cp contracts/configs/main.json s3://${{ steps.extract_bucket.outputs.bucket_name }}/index.html --content-type application/json --cache-control no-cache