generated from Consensys/doctools.template-site
-
Notifications
You must be signed in to change notification settings - Fork 446
61 lines (53 loc) · 1.72 KB
/
update-node-size.yml
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
name: Update Node Size Data
on:
schedule:
- cron: '0 0 * * 1' # Runs at 00:00 UTC every Monday
workflow_dispatch: # Allows manual triggering
jobs:
update-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '20.9.0' # or whatever version you're using
- name: Install dependencies
run: npm ci
- name: Run update script
env:
LINEA_OBSERVABILITY_USER: ${{ secrets.LINEA_OBSERVABILITY_USER }}
LINEA_OBSERVABILITY_PASS: ${{ secrets.LINEA_OBSERVABILITY_PASS }}
run: node scripts/fetchNodeSize.js
- name: Check for changes
id: git-check
run: |
git add linea-node-size/data.json
git diff --staged --exit-code
continue-on-error: true
- name: Create Pull Request
if: steps.git-check.outcome == 'failure'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update node size data
title: 'Update Node Size Data'
body: |
This is an automated PR to update the node size data.
Please review the changes and merge if everything looks correct.
branch: update-node-size-data
delete-branch: true
slackNotification:
needs: [update-data]
if: ${{ failure() }}
runs-on: ubuntu-latest
steps:
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: doc-ci-alerts
SLACK_COLOR: danger
SLACK_USERNAME: ci
SLACK_TITLE: Linea node size update - Failure
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
MSG_MINIMAL: true