Scheduled build #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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>" |