Upload bridge config on test #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload bridge config on test | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- '*' | |
paths: | |
- 'contracts/configs/legacy/test.json' | |
- 'contracts/configs/test.json' | |
jobs: | |
upload_chainspec_devnet: | |
runs-on: ubuntu-latest | |
steps: | |
- name: pull source | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
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 legacy config | |
run: | | |
aws s3 cp contracts/configs/legacy/test.json s3://${{ steps.extract_bucket.outputs.bucket_name }}/v1 --content-type application/json --cache-control no-cache | |
- name: Upload config | |
run: | | |
aws s3 cp contracts/configs/test.json s3://${{ steps.extract_bucket.outputs.bucket_name }}/v2 --content-type application/json --cache-control no-cache |