-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v3: automate regeneration when spec changes (#643)
Everyday at 7 AM we trigger a GitHub Action that runs `make generate`. This will download the exoscale API spec and try to regenerate egoscale v3. If there are changes, we create a PR with those changes.
- Loading branch information
Showing
5 changed files
with
15,981 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: check_and_regenerate_v3 | ||
|
||
on: | ||
schedule: | ||
- cron: "0 7 * * *" # everyday at 7 AM | ||
|
||
jobs: | ||
check_changes_and_create_pr: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check for changes | ||
id: check_changes | ||
run: | | ||
make generate | ||
git diff --quiet || echo "::set-output name=changes_detected::true" | ||
- name: Create PR | ||
if: steps.check_changes.outputs.changes_detected | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
title: "v3: regenerate from new API spec" | ||
body: "New changes have appeared in the API spec and egoscale v3 has been regenerated." | ||
branch: generate-v3 | ||
delete-branch: true | ||
base: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,3 @@ test/ | |
listApis.json | ||
public-api.json | ||
release | ||
v3/generator/source.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
Changelog | ||
========= | ||
|
||
Unreleased | ||
---------- | ||
|
||
- v3: automate regeneration when spec changes #643 | ||
|
||
3.1.0 | ||
---------- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,5 @@ generate: | |
@go generate | ||
@go mod tidy | ||
@go mod vendor | ||
@rm source.yaml | ||
@cd .. | ||
@ls -l *.go 1>&2 |
Oops, something went wrong.