Skip to content

Commit 009dc5f

Browse files
committed
passing the filepath as output
1 parent 3d03c16 commit 009dc5f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/detect-api.changes.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858

5959
- name: 🔍 Detect Changes
6060
uses: Adyen/adyen-swift-public-api-diff@github-action
61+
id: public_api_diff
6162
with:
6263
platform: "macOS"
6364
new: ${{ env.NEW_VERSION }}
@@ -67,6 +68,6 @@ jobs:
6768
name: 📝 Comment on PR
6869
uses: thollander/actions-comment-pull-request@v3
6970
with:
70-
file-path: "${{ github.workspace }}/api_comparison.md"
71+
file-path: "${{ steps.public_api_diff.outputs.filepath }}"
7172
comment-tag: api_changes
7273
mode: recreate

action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ inputs:
1111
description: 'Specify the old version to compare to'
1212
required: true
1313
outputs:
14-
markdown:
15-
description: 'The generated markdown output'
14+
filepath:
15+
description: 'The filepath to the generated markdown output'
1616
runs:
1717
using: 'composite'
1818
steps:
@@ -25,7 +25,7 @@ runs:
2525
echo $PROJECT_FOLDER
2626
swift run public-api-diff project --new "$NEW" --old "$OLD" --platform "$PLATFORM" --output "$PROJECT_FOLDER/api_comparison.md" --log-level debug --log-output "$PROJECT_FOLDER/logs.txt"
2727
cat "$PROJECT_FOLDER/logs.txt"
28-
echo "markdown=\"$(cat "$PROJECT_FOLDER/api_comparison.md")\"" >> $GITHUB_OUTPUT
28+
echo "filepath=\"$PROJECT_FOLDER/api_comparison.md\"" >> $GITHUB_OUTPUT
2929
shell: bash
3030

3131

0 commit comments

Comments
 (0)