generated from fresh-app/fresh-bun-project
-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (42 loc) · 1.18 KB
/
sync.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
name: Synchronize
on:
push:
branches:
- main
paths-ignore:
- 'README.md'
workflow_dispatch:
permissions:
contents: write
jobs:
sync:
name: Synchronize
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Bun
uses: oven-sh/setup-bun@v0.1.8
with:
bun-version: '0.5.8'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: bun install
- name: Synchronize messages
run: bun scripts/sync-messages.ts
env:
RESOURCES_WEBHOOK_URL: ${{ secrets.RESOURCES_WEBHOOK_URL }}
RULES_WEBHOOK_URL: ${{ secrets.RULES_WEBHOOK_URL }}
- name: Synchronize teams
run: bun scripts/sync-teams.ts --confirm
env:
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
- uses: stefanzweifel/git-auto-commit-action@v4
if: always()
with:
commit_message: Update state file
commit_user_name: 'creatorsgarten[bot]'
commit_user_email: 'creatorsgarten[bot]@users.noreply.github.com'
- name: Dump the new state
if: always()
run: cat state.yml