-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (38 loc) · 1.05 KB
/
update.yaml
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
# yamllint disable rule:line-length
# yamllint disable rule:braces
name: Database Update (Self-Hosted)
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '27 7 * * *'
push:
branches:
- master
- main
jobs:
update:
runs-on: self-hosted
name: DB Update
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install dependencies
run: |
composer update --optimize-autoloader --no-interaction --no-progress
- name: Update database
run: |
make cron-clean
make cron
- name: Get date updated
id: last-update-date
run: echo "::set-output name=date::$(cat docs/_data/last-update-date)"
- name: Run tests
run: |
vendor/bin/phpunit
- name: Commit
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: Automatic build for ${{ steps.last-update-date.outputs.date }}
add: docs/json/