Skip to content

Commit

Permalink
test diff
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Volak committed Jan 27, 2024
1 parent 8579c13 commit 24cb227
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 5 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/openapi_diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,35 @@ jobs:
timeout-minutes: 5
steps:
- name: Check out head branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: head
- name: Check out swagger_docs branch
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: swagger_docs
path: base
fetch-depth: 2
- run: cd base && git checkout HEAD^
- name: Run OpenAPI Diff (from HEAD revision)
uses: docker://openapitools/openapi-diff:latest
with:
args: --json diff.json base/latest.json head/latest.json
args: --json diff.json --text diff.txt base/latest.json head/latest.json
- name: print diff
run: cat diff.json
run: |
echo "{\"text\": \"$(cat diff.json)\" }" > result.json
- name: Send custom JSON data to Slack workflow
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'fx_api_changes'
payload-file-path: "./result.json"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# - name: Upload to slack step
# uses: adrey/slack-file-upload-action@master
# with:
# token: ${{ secrets.SLACK_BOT_TOKEN }}
# path: diff.json
# channel: fx_api_changes
Loading

0 comments on commit 24cb227

Please sign in to comment.