-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 1.04 KB
/
meta-updater.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
name: Updater
on:
push:
branches:
- main
schedule:
# Run every day at 00:00 UTC
- cron: '0 0 * * *'
# Allow manual running as well
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
name: Install dependencies
- run: bun run src/index.ts
name: Update things
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
CURSEFORGE_TOKEN: ${{ secrets.CURSEFORGE_TOKEN }}
# Commit any changes back to the project
- run: git config --global user.email "[email protected]"
- run: git config --global user.name "Michael Hillcox"
- run: git add .
# Check if there are any changes to commit
- run: git diff --quiet --exit-code || git commit -m "Update things"
- run: git remote set-url origin "https://michaelhillcox:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}"
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- run: git push