-
Notifications
You must be signed in to change notification settings - Fork 873
62 lines (52 loc) · 1.97 KB
/
evm_okx.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
62
name: EVM OKX Merge
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
create-pull-request:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: |
npm install --prefix _script/evm_okx
- name: Set environment variables
run: |
echo "OKX_API_KEY=${{ secrets.OKX_API_KEY }}" >> $GITHUB_ENV
echo "OKX_SECRET_KEY=${{ secrets.OKX_SECRET_KEY }}" >> $GITHUB_ENV
echo "OKX_PASSPHRASE=${{ secrets.OKX_PASSPHRASE }}" >> $GITHUB_ENV
echo "COINGECKO_API_KEY=${{ secrets.COINGECKO_API_KEY }}" >> $GITHUB_ENV
echo "FRONT_API_KEY=${{ secrets.FRONT_API_KEY }}" >> $GITHUB_ENV
- name: Run code modification script
run: |
node _script/evm_okx/evm_okx.mjs cronos 25
node _script/evm_okx/evm_okx.mjs fantom 250
env:
API_KEY: ${{ secrets.OKX_API_KEY }}
SECRET_KEY: ${{ secrets.OKX_SECRET_KEY }}
PASSPHRASE: ${{ secrets.OKX_PASSPHRASE }}
COINGECKO_API_KEY: ${{ secrets.COINGECKO_API_KEY }}
FRONT_API_KEY: ${{ secrets.FRONT_API_KEY }}
- name: Create dynamic branch name
id: vars
run: |
BRANCH_NAME="update-assets-$(date +%Y%m%d%H%M%S)"
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Automated code modification"
branch: ${{ steps.vars.outputs.branch_name }}
title: "Automated PR: Weekly evm assets modification with OKX"
body: "cronos"
draft: false
delete-branch: true # PR 병합 후 브랜치 삭제