-
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (54 loc) · 2 KB
/
smithy-sync.yml
File metadata and controls
67 lines (54 loc) · 2 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
name: Smithy Model Sync
on:
schedule:
- cron: "0 0 * * 1" # Every Monday at midnight UTC
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version: "1.26"
- name: Install SQLite dev headers
run: sudo apt-get install -y libsqlite3-dev
- name: Download latest Smithy models
run: bash scripts/download-smithy-models.sh
- name: Run code generation
run: |
CGO_ENABLED=1 go run ./cmd/codegen \
-models ./smithy-models \
-output ./internal/generated \
-templates ./internal/codegen/templates \
-scaffold-output ./internal/services
- name: Regenerate imports
run: bash scripts/generate-imports.sh
- name: Check for changes
id: changes
run: |
if git diff --quiet; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: Run tests
if: steps.changes.outputs.changed == 'true'
run: CGO_ENABLED=1 go test ./internal/... -v
- name: Create Pull Request
if: steps.changes.outputs.changed == 'true'
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8
with:
commit-message: "chore: sync Smithy models and regenerate code"
title: "chore: weekly Smithy model sync"
body: |
Automated weekly sync of AWS Smithy models from `aws-sdk-go-v2`.
This PR updates generated code in `internal/generated/` and scaffolds
in `internal/services/` based on the latest AWS service models.
Please review and merge if CI passes.
branch: smithy-sync/weekly
delete-branch: true