-
Notifications
You must be signed in to change notification settings - Fork 106
83 lines (70 loc) · 2.35 KB
/
update_chain_prefix.yaml
File metadata and controls
83 lines (70 loc) · 2.35 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Check and update legacyAddressPrefix
on:
schedule:
- cron: '0 9 * * *'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
setup-paths:
runs-on: ubuntu-latest
outputs:
chains_path: ${{ env.CHAINS_JSON_PATH }}
dev_chains_path: ${{ env.DEV_CHAINS_JSON_PATH }}
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
check-legacy-address-prefix:
needs: setup-paths
runs-on: ubuntu-latest
strategy:
matrix:
json_path:
- ${{ needs.setup-paths.outputs.chains_path }}
- ${{ needs.setup-paths.outputs.dev_chains_path }}
steps:
- name: Checkout current repository to Master branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: ⚙️ Install dependencies
run: make init
- name: 🦾 Check legacyAddressPrefix
run: make check-legacy-address-prefix JSON_PATH=${{ matrix.json_path }}
- name: Make Pull Request
uses: ./.github/workflows/make-pull-request
with:
commit-files: chains/**
commit-message: Update legacyAddressPrefix
app-id: ${{ secrets.PR_APP_ID}}
app-token: ${{ secrets.PR_APP_TOKEN}}
pr-reviewer: ${{ env.PR_REVIEWER }}
branch-name: update-prefix-chains-${{ matrix.json_path }}
pr-title: 🆙 Update legacyAddressPrefix - ${{ matrix.json_path }}
pr-body: This PR was generated automatically 🤖
pr-base: master
alert:
runs-on: ubuntu-latest
needs: check-legacy-address-prefix
if: always() && (needs.check-legacy-address-prefix.result == 'failure')
env:
GITHUB_WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
steps:
- name: Report
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
message: |
LegacyAddressPrefix check workflow failed, lets check:
Failed run:
${{ env.GITHUB_WORKFLOW_URL }}