-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (27 loc) · 899 Bytes
/
main.yml
File metadata and controls
32 lines (27 loc) · 899 Bytes
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
name: Code check and stats generation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install PHP
run: sudo apt-get install php -y;
- name: Code check
run: |
php code_check.php;
- name: Generate stats
shell: bash
if: github.event_name != 'pull_request'
run: |
php genstats.php && \
git config --global user.name "GitHub Actions" && \
git config --global user.email "actions@github.com";
git add -A || true;
git commit -s -m "$(echo -e 'README.md: update stats\n\nCo-authored-by: GitHub Staff <support@github.com>\nSigned-off-by: GitHub Actions <actions@github.com>')" || true;
git push -vf origin ${GITHUB_REF##*/} || true;