-
Notifications
You must be signed in to change notification settings - Fork 105
68 lines (57 loc) · 1.93 KB
/
update_xcm_data.yaml
File metadata and controls
68 lines (57 loc) · 1.93 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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 }}