-
Notifications
You must be signed in to change notification settings - Fork 5
82 lines (65 loc) · 2.65 KB
/
autoupdate-preview.yaml
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
72
73
74
75
76
77
78
name: Generate Preview SDK
on:
workflow_dispatch:
schedule:
- cron: '30 8 * * 1,3,5'
jobs:
generate-client:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- run: make install-goimports
- name: Fetch changes
working-directory: ./tools
run: make fetch_openapi
env:
API_BASE_URL: ${{ secrets.MDB_CURRENT_API_PREVIEW_URL }}
S3_BUCKET: ${{ secrets.MDB_CURRENT_API_PREVIEW_S3_BUCKET }}
- name: Verify Changed files
uses: tj-actions/verify-changed-files@bbd436f8e34e14fee2a0f7bc5b14bcc6b40927cf
id: verify-changed-files
with:
files: |
**/atlas-api.yaml
- name: Run generation
if: steps.verify-changed-files.outputs.files_changed == 'true'
working-directory: ./tools
run: |
export PATH=${PATH}:`go env GOPATH`/bin
make clean_and_generate
- name: Run mock generation
working-directory: ./tools
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: make generate_mocks
- uses: peter-evans/create-pull-request@v7
if: steps.verify-changed-files.outputs.files_changed == 'true'
with:
token: ${{ secrets.APIX_BOT_PAT }}
title: "APIBot: GO SDK Dev Preview"
commit-message: "temp: client update"
delete-branch: true
draft: true
branch: dev-latest
body: |
Automatic update for MongoDB Atlas Go Client based on *release candidate* OpenAPI file.
**DO NOT MERGE THIS PR TO THE MAIN BRANCH**
> NOTE: This PR provides notifications for stability of the RC OpenAPI files
> It is not intented to be merged!
> When PR is closed the new PR will be automatically regenerated
## Using early preview changes
```sh
go get go.mongodb.org/atlas-sdk@dev-latest
```
## Automated checks done for preview sdk
1. Compilation and unit tests
2. Documentation style
3. Transformation engine linting
## Breaking Changes
For list of possible breaking changes please refer to `Detect Breaking Changes` job.
## Release schedule
PR is updated 3 times a week with latest changes from the RC for the API.
PR can be updated manually by running workflow: https://github.com/mongodb/atlas-sdk-go/actions/workflows/autoupdate-preview.yaml