Skip to content

Commit 571d75d

Browse files
committed
Add generate Github actions
1 parent bd20ad2 commit 571d75d

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/generate.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: generate
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
workflow_dispatch:
7+
8+
jobs:
9+
run:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Setup PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: '8.0'
17+
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Generate
22+
run: make
23+
24+
- name: Count changes
25+
id: changes
26+
run: |
27+
git add -N .
28+
echo "::set-output name=count::$(git diff --name-only | wc -l)"
29+
30+
- name: Create Pull Request
31+
uses: peter-evans/create-pull-request@v3
32+
with:
33+
commit-message: Update Error Code
34+
delete-branch: true
35+
title: Update Error Code
36+
body: |
37+
Error codes have been updated.
38+
39+
- https://github.com/postgres/postgres/blob/master/src/backend/utils/errcodes.txt
40+
if: ${{ steps.changes.outputs.count > 0 }}

0 commit comments

Comments
 (0)