Skip to content

XCM Global Asset Registry Generation #1739

XCM Global Asset Registry Generation

XCM Global Asset Registry Generation #1739

Workflow file for this run

name: XCM Global Asset Registry Generation
on:
push:
branches:
- action
- test
paths:
- .github/workflows/deploy.yml
- publicEndpoints/*.json
- chainParsers/*.js
- xcmgar
- xcmgarManager.js
- xcmgarTool.js
schedule:
- cron: '30 */12 * * *'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [17.x]
steps:
- uses: actions/checkout@v2
- name: Use node js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm install
- name: Polkadot XCM Global Asset Registry Generation
run: node xcmgar registry -r polkadot
- name: Kusama XCM Global Asset Registry Generation
run: node xcmgar registry -r kusama
- name: XCM GAR metadata Generation
run: node xcmgar generate -m -u
- name: Show diff
run: |
git diff assets
git diff xcAssets
git diff xcmRegistry
git diff metadata
- name: Configure Git Client
run: |
git config user.name github-actions
git config user.email [email protected]
- name: Set timestamp
run: |
echo "CURRENT_TIMESTAMP=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_ENV
echo "CommitHash=$(cut -d'-' -f2 <<< $(node xcmgar -V))" >> $GITHUB_ENV
- name: Commit changes to assets
run: |
git add assets/*.json && \
git add xcmRegistry/*.json && \
git add xcAssets/*.json && \
git add metadata/*.json && \
git commit -m "[Auto] XCM Assets/Registry Updates (${{ env.CURRENT_TIMESTAMP }}-${{env.CommitHash}})" || echo "No changes to commit"
- name: Push changes to assets
run: git push origin $BRANCH_NAME
- name: send Notification to telegram
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
${{ github.actor }} created commit:
Commit message: ${{ github.event.commits[0].message }}
Repository: ${{ github.repository }}
See changes: https:/${{ github.repository }}/commit/${{github.sha}}
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}