-
Notifications
You must be signed in to change notification settings - Fork 14
71 lines (70 loc) · 2.76 KB
/
build.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
63
64
65
66
67
68
69
70
71
name: 📑 Updating lists
on:
schedule:
- cron: '0 0 * * Sun'
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[bot] - Update lists')"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: GoSetup
uses: actions/setup-go@v3
with:
go-version-file: './go.mod'
go-version: '1.23.4'
- name: run
env:
RPC_URI_FOR_1: ${{ secrets.RPC_URI_FOR_1 }}
RPC_URI_FOR_10: ${{ secrets.RPC_URI_FOR_10 }}
RPC_URI_FOR_56: ${{ secrets.RPC_URI_FOR_56 }}
RPC_URI_FOR_100: ${{ secrets.RPC_URI_FOR_100 }}
RPC_URI_FOR_137: ${{ secrets.RPC_URI_FOR_137 }}
RPC_URI_FOR_250: ${{ secrets.RPC_URI_FOR_250 }}
RPC_URI_FOR_252: ${{ secrets.RPC_URI_FOR_252 }}
RPC_URI_FOR_288: ${{ secrets.RPC_URI_FOR_288 }}
RPC_URI_FOR_8453: ${{ secrets.RPC_URI_FOR_8453 }}
RPC_URI_FOR_42161: ${{ secrets.RPC_URI_FOR_42161 }}
RPC_URI_FOR_42170: ${{ secrets.RPC_URI_FOR_42170 }}
RPC_URI_FOR_56288: ${{ secrets.RPC_URI_FOR_56288 }}
RPC_URI_FOR_81457: ${{ secrets.RPC_URI_FOR_81457 }}
RPC_URI_FOR_111188: ${{ secrets.RPC_URI_FOR_111188 }}
BEARER_FOR_1INCH: ${{ secrets.BEARER_FOR_1INCH }}
run: go run ./generators tokens
- name: Commit files
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "[bot] - Update lists"
- name: Temporarily disable "include administrators" branch protection
uses: benjefferies/branch-protection-bot@master
if: always()
with:
access_token: ${{ secrets.ACCESS_TOKEN }}
branch: ${{ github.event.repository.default_branch }}
enforce_admins: false
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
branch: ${{ github.ref }}
- name: Enable "include administrators" branch protection
uses: benjefferies/branch-protection-bot@master
if: always() # Force to always run this step to ensure "include administrators" is always turned back on
with:
access_token: ${{ secrets.ACCESS_TOKEN }}
owner: smoldapp
repo: tokenLists
branch: ${{ github.event.repository.default_branch }}
enforce_admins: true