forked from github/github-mcp-server
-
Notifications
You must be signed in to change notification settings - Fork 1
97 lines (82 loc) · 2.88 KB
/
auto-update.yml
File metadata and controls
97 lines (82 loc) · 2.88 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Auto Update & Upgrade
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
jobs:
update-dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Update npm packages
run: |
npm update
npm outdated || true
- name: Check Solana SDK Updates
run: |
CURRENT=$(npm list @solana/web3.js --depth=0 | grep @solana/web3.js | awk '{print $2}')
LATEST=$(npm view @solana/web3.js version)
echo "Current: $CURRENT"
echo "Latest: $LATEST"
if [ "$CURRENT" != "$LATEST" ]; then
npm install @solana/web3.js@latest
fi
- name: Search Solana Best Practices
run: |
echo "🔍 Searching for Solana best practices..."
curl -s "https://api.github.com/search/repositories?q=solana+security+best+practices&sort=stars" | jq -r '.items[0:3] | .[] | .html_url'
- name: Create PR with Updates
uses: peter-evans/create-pull-request@v7
with:
commit-message: "⬆️ Update dependencies and apply best practices"
title: "Automated Dependency Updates"
body: |
## Automated Updates
This PR includes:
- Updated npm dependencies
- Latest Solana SDK
- Security patches
Please review and merge.
branch: auto-updates
labels: automated, dependencies
solana-upgrade-check:
runs-on: ubuntu-latest
steps:
- name: Check Solana Network Upgrades
run: |
echo "🔄 Checking Solana network upgrades..."
curl -s https://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getVersion"
}' | jq .
- name: Check Program Upgrade Status
run: |
echo "📦 Checking program upgrade status..."
curl -s https://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getAccountInfo",
"params": ["4Ec7ZxZS6Sbdg5UGSLHbAnM7GQHp2eFd4KYWRexAipQT", {"encoding": "base64"}]
}' | jq .result
- name: Report Findings
run: |
echo "📊 Generating upgrade report..."
cat > upgrade-report.md <<EOF
# Solana Upgrade Report
**Date:** $(date)
## Network Status
- Cluster: Mainnet-beta
- Health: Active
## Recommendations
- Keep dependencies updated
- Monitor program upgrades
- Review security advisories
EOF
cat upgrade-report.md