-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (40 loc) · 1.25 KB
/
nodejs.yml
File metadata and controls
50 lines (40 loc) · 1.25 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
name: generate-lists
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '59 4,10,16,22 * * *'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Cleanup
run: rm -rf *
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Bun
# Use the official Bun action to install Bun
uses: oven-sh/setup-bun@v1
with:
# Optional: specify a Bun version
bun-version: latest
- name: Install Dependencies
# 'bun install' is significantly faster than 'npm install'
run: bun install --frozen-lockfile
- name: Generate IP Lists
# Run the script directly with Bun
run: bun run index.ts
- name: Commit files
run: |
git config --local user.email "me@brahma.world"
git config --local user.name "Github Action Bot"
git config --local commit.gpgsign false
if [ -z "$(git status --porcelain)" ]; then
git commit -m "No change in the list" --allow-empty -- files
else
git commit -m "Updated List" -- files
fi
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}