Skip to content

Update xcm coefficients #1865

Update xcm coefficients

Update xcm coefficients #1865

name: Update xcm coefficients
on:
schedule:
- cron: '0 */6 * * *' # every 6 hours
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-xcm:
runs-on: ubuntu-latest
strategy:
matrix:
environment: ['DEV', 'PROD']
steps:
- name: Checkout current repository to Master branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 🛠 Set up actual paths
uses: ./.github/workflows/setup-path
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: ⚙️ Install dependencies
run: |
make init
- name: 🦾 Update xcm config
env:
ENVIRONMENT: ${{ matrix.environment }}
run: |
make update-xcm-config
- name: Make Pull Request
uses: ./.github/workflows/make-pull-request
with:
commit-files: xcm/**/*.json${{ matrix.environment == 'DEV' && ', scripts/**/*.json' || '' }}
commit-message: Update xcm config for ${{ matrix.environment }} env
app-id: ${{ secrets.PR_APP_ID}}
app-token: ${{ secrets.PR_APP_TOKEN}}
pr-reviewer: 'leohar,stepanLav'
branch-name: update-xcm-coefficients-${{ matrix.environment }}
pr-title: 🆙 Update XCM config for ${{ matrix.environment }} env
pr-body: This PR was generated automatically 🤖
pr-base: master
- name: Alert
if: failure()
env:
GITHUB_WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
uses: appleboy/telegram-action@v0.1.0
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
XCM update workflow failed for ${{ matrix.environment }}, lets check:
Failed run:
${{ env.GITHUB_WORKFLOW_URL }}