-
Notifications
You must be signed in to change notification settings - Fork 13
56 lines (52 loc) · 1.59 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
name: Build database
on:
push:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.8
env:
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_DATABASE: ispyb_build
MYSQL_ROOT_PASSWORD: rootpassword
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: pandoc
version: 1.0
- uses: shogo82148/actions-setup-mysql@v1
with:
distribution: 'mariadb'
mysql-version: '10.8'
auto-start: false
- name: Build database
run: |
cp .my.example.cnf .my.cnf
bash build.sh
- name: Regenerate sql files
run: |
mysqldump --version
cd bin
bash backup.sh ../schemas/ispyb/
rm ../.my.cnf
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
if: github.ref == 'refs/heads/master'
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update database sql files
title: Update database sql files
body: |
This is an automated pull request to update the ISPyB database sql files
Before merging this pull request you may want to:
* [ ] Update `HISTORY.md` to reflect the changes in this pull request
branch: update-schema-sql