-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (63 loc) · 2.25 KB
/
plsql-gate.yml
File metadata and controls
71 lines (63 loc) · 2.25 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
# Reference `.github/workflows/plsql-gate.yml` per PLSQL-CICD-017.
#
# Unlike `ci.yml` (which gates the *plsql-intelligence repository itself*),
# this file is the canonical GitHub Actions reference workflow that a
# downstream PL/SQL consumer copies into their own repository to gate
# their PRs with the `plsql cicd` family.
#
# Maintenance note: this file is NOT enabled in this repo (we have no
# PL/SQL code of our own to gate). It exists at this path so a Dependabot-
# style integration can mirror it. Use `examples/ci/github-actions.yml`
# for the annotated walkthrough version.
name: plsql-gate
on:
pull_request:
paths:
- "**/*.sql"
- "**/*.pks"
- "**/*.pkb"
- "**/*.tps"
- "**/*.tpb"
- "**/*.trg"
- "**/*.vw"
permissions:
contents: read
pull-requests: write
jobs:
plsql-cicd:
runs-on: ubuntu-latest
if: ${{ false }} # reference-only — flip to `true` after dropping
# into a downstream repository.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install plsql CLI (released)
run: curl -fsSL https://example.invalid/install.sh | bash -s -- --version 0.x
- name: Run plsql cicd predict + gate
run: |
plsql lineage classify-change \
--before ${{ github.event.pull_request.base.sha }} \
--after ${{ github.sha }} --robot-json > changeset.json
plsql cicd predict --changeset changeset.json --mode catalog-aware \
--catalog-snapshot ./.plsql/catalog-snapshot.json \
--robot-json > prediction.json
plsql cicd gate --prediction prediction.json \
--policy .plsql-cicd-policy.toml --robot-json > gate.json
- name: Post structured PR comment
if: always()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
plsql post-pr-comment --gate gate.json \
--pull-request ${{ github.event.pull_request.number }} \
--repository ${{ github.repository }}
- name: Upload reports
if: always()
uses: actions/upload-artifact@v4
with:
name: plsql-cicd-reports
path: |
changeset.json
prediction.json
gate.json