-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (44 loc) · 1.54 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
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
# https://github.com/actions/checkout
# https://github.com/shivammathur/setup-php
# https://github.com/ramsey/composer-install
# https://github.com/stefanzweifel/git-auto-commit-action
name: "Scheduled build"
on:
push:
branches:
- main
schedule:
# POSIX cron syntax (Fridays, 5pm), https://crontab.guru/#0_17_*_*_5
- cron: "0 17 * * 5"
env:
PHP_EXTENSIONS: curl, fileinfo, intl, json, mbstring, simplexml, sodium, zlib
PHP_INI_VALUES: memory_limit=-1, error_reporting=-1, display_errors=On
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
extensions: ${{ env.PHP_EXTENSIONS }}
ini-values: ${{ env.PHP_INI_VALUES }}
coverage: none
- name: "Install dependencies with composer"
uses: ramsey/composer-install@v3
- name: "Fetch cacert.pem from curl.se"
run: curl -o ./tools/cacert.pem https://curl.se/ca/cacert.pem
- name: "Run build"
run: php ./tools/build.php
- name: "Commit changes"
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: ":octocat: data update"
file_pattern: "src/*.json"
commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"