-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: post diff as comment on PRs that modify vocdoni-api.yaml
- Loading branch information
Showing
1 changed file
with
23 additions
and
0 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 |
---|---|---|
|
@@ -34,6 +34,29 @@ jobs: | |
cmd: | | ||
yq '.components.schemas."api.GenericTransactionWithInfo".properties.tx = load("api/docs/models/transactions.yaml").target' \ | ||
api/docs/oas3.yaml > api/docs/vocdoni-api.yaml | ||
- name: Fetch upstream vocdoni-api.yaml | ||
run: | | ||
git add api/docs/vocdoni-api.yaml | ||
curl -o api/docs/vocdoni-api.yaml https://raw.githubusercontent.com/vocdoni/developer-portal/main/swaggers/vocdoni-api.yaml | ||
- name: Check if there is a difference | ||
uses: mathiasvr/[email protected] | ||
id: diff | ||
with: | ||
run: git diff --color api/docs/vocdoni-api.yaml | ||
|
||
- name: Post PR comment with diff | ||
if: ${{ steps.diff.outputs.stdout }} | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
header: "This PR introduces the following changes in the developer-portal documentation:" | ||
message: | | ||
```diff | ||
${{ steps.diff.outputs.stdout }} | ||
``` | ||
- name: Publish Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
|