Repository navigation
70 lines (61 loc) · 2.02 KB
/
Copy pathcapability-matrix-sync.yml
File metadata and controls
70 lines (61 loc) · 2.02 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
name: Sync capability matrix
on:
push:
branches: [master]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Identify changes
runs-on: ubuntu-latest
permissions:
contents: read
outputs:
csharp: ${{ steps.areas.outputs.csharp }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- id: areas
run: ./scripts/quality-gate/identify-changes.sh "$BASE" | tee -a "$GITHUB_OUTPUT"
env:
BASE: ${{ github.event.before }}
sync:
name: Sync capability matrix
needs: changes
if: needs.changes.outputs.csharp == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v7
- name: Checkout capability spec
uses: actions/checkout@v7
with:
repository: supabase/sdk
path: _sdk-spec
persist-credentials: false
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
global-json-file: global.json
- name: Regenerate sdk-compliance.yaml from capability annotations
run: |
dotnet run --project packages/CapabilityMatrix/CapabilityMatrix/CapabilityMatrix.csproj -- \
generate --spec _sdk-spec/packages/capability-matrix/capabilities
- name: Open PR with the regenerated compliance file
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.PAT_AUTOMATION_STEPS }}
add-paths: sdk-compliance.yaml
base: master
branch: automation/sync-sdk-compliance
delete-branch: true
commit-message: "chore(capability-matrix): refresh sdk-compliance"
title: "chore(capability-matrix): refresh sdk-compliance"
body: |
Regenerates `sdk-compliance.yaml` from the in-code `[ImplementedCapability]` /
`[PartialCapability]` annotations after the last merge to master.