-
Notifications
You must be signed in to change notification settings - Fork 6
38 lines (30 loc) · 1.35 KB
/
schemacrawler-lint.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
name: SchemaCrawler Job to Lint Database Schema
on: [push]
jobs:
schemacrawler-job:
runs-on: ubuntu-latest
name: SchemaCrawler Job to Lint Database Schema
steps:
- id: checkout
name: Checkout repository
uses: actions/checkout@v3
- id: schemacrawler
name: Run SchemaCrawler Action with specified command-line
uses: schemacrawler/[email protected]
with:
entrypoint: /schemacrawler.sh
args: --server=sqlite --database=schemacrawler.sqlite --user:env USER --password:env PASSWORD --info-level=standard --command=lint --linter-configs /schemacrawler-linter-configs.yaml --lint-dispatch=terminate_system --output-file lint-report.txt --log-level=FINE
env:
USER: user-possibly-from-secrets
PASSWORD: password-possibly-from-secrets
- id: upload-lint-report
name: Upload SchemaCrawler lint report
uses: actions/upload-artifact@v2
with:
name: lint-report
path: lint-report.txt
- id: check-success
name: Fail the entire job if SchemaCrawler lint report has failures
run: |
[ ${{ env.SC_EXIT_STATUS }} -eq 0 ] && echo "SchemaCrawler lint check succeeded" || echo "SchemaCrawler lint check shows failures - see the lint report"
[ ${{ env.SC_EXIT_STATUS }} -eq 0 ] || exit 1