-
Notifications
You must be signed in to change notification settings - Fork 2
39 lines (32 loc) · 1.17 KB
/
upload_config_dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Upload bridge config on dev
on:
workflow_dispatch:
push:
branches:
- dev
- main
paths:
- 'contracts/configs/dev.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-dev | awk '{print $3}')"
- name: Upload config legacy
run: |
aws s3 cp contracts/configs/dev.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