Skip to content

Merge remote-tracking branch 'root/master' #541

Merge remote-tracking branch 'root/master'

Merge remote-tracking branch 'root/master' #541

---
name: Upload assets on merge
on:
push:
branches: [master]
workflow_dispatch:
jobs:
build:
name: Build and publish the latest token assets
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.18
id: go
- name: Checkout repo
uses: actions/checkout@v2
- name: Sync assets to staging folder
run: |
make copy-logos-to-staging
cp -r dapps staging/dapps
cp -r exchanges staging/exchanges
- name: Install Cloudinary CLI
run: |
sudo apt install pipx
pipx install cloudinary-cli
cld --version
- name: Upload assets to Cloudinary
env:
CLOUDINARY_URL: ${{ secrets.CLOUDINARY_URL }}
run: |
cd staging
cld sync -FK --push assets assets
cld sync -FK --push dapps dapps
cld sync -FK --push exchanges exchanges
- 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-1
- name: Upload asset logos manifest to S3 and invalidate cloudfront
run: |
aws s3 cp staging/assets/asset-logos-manifest.json s3://rainbow-metadata-production/token-list/asset-logos-manifest.json
aws cloudfront create-invalidation --distribution-id "E1FFQRZXAO7TUP" --paths "/token-list/*"