Skip to content

Commit

Permalink
Merge branch 'dev' into new-cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
SvineruS committed Jan 9, 2024
2 parents aa1f529 + 5e28f92 commit ec37c3a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/upload_config_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 10 additions & 5 deletions .github/workflows/upload_config_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ on:
workflow_dispatch:
push:
branches:
- dev
- main
paths:
- 'contracts/configs/main.json'

jobs:
upload_chainspec_mainnet:
upload_chainspec_devnet:
runs-on: ubuntu-latest

steps:
Expand All @@ -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/main.json s3://${{ steps.extract_bucket.outputs.bucket_name }}/index.html --content-type application/json --cache-control no-cache
14 changes: 9 additions & 5 deletions .github/workflows/upload_config_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- 'contracts/configs/legacy/test.json'

jobs:
upload_chainspec_testnet:
upload_chainspec_devnet:
runs-on: ubuntu-latest

steps:
Expand All @@ -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

0 comments on commit ec37c3a

Please sign in to comment.