-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (33 loc) · 1.09 KB
/
github-actions.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
name: Generate data
on:
schedule:
- cron: '*/5 * * * *'
push:
pull_request:
workflow_dispatch:
jobs:
linux:
strategy:
matrix:
swift_version: ['5.7']
runs-on: ubuntu-latest
env:
ACTIONS_RUNNER_DEBUG: true
ACTIONS_STEP_DEBUG: true
container:
image: swift:${{ matrix.swift_version }}
steps:
- uses: actions/checkout@v3
- name: Configure git to trust the workspace despite the different owner
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Build
run: swift build -c release
- name: Generate webview data
run: |
.build/release/sn3 webview > Data/splatnet3_webview_data.json
- name: Commit data
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add Data/*json
if test "$(git diff --name-only --cached 2>/dev/null | wc -l)" -gt "0" ; then git commit -m "Update data." && git push; else echo No changes found; fi