Skip to content

Commit

Permalink
percy snapshots extraction comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuzina authored and bartaz committed May 21, 2024
1 parent f5c51e1 commit fdd7162
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/pr-percy-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,16 @@ jobs:
PERCY_CLIENT_ERROR_LOGS: false
run: |
set -e
# Start a percy build and capture the stdout
percy_output=$(yarn percy)
# Extract the build link from the stdout of the snapshot command
build_link=$(echo "$percy_output" | sed -n 's/.*Finalized build #.*: \(https:\/\/percy.io\/[^ ]*\).*/\1/p')
# Using '/' to split the $build_link, extract the organization and build identifiers
org_id=$(echo "$build_link" | cut -d '/' -f 4)
build_id=$(echo "$build_link" | cut -d '/' -f 7)
echo "build_link=$build_link" >> $GITHUB_OUTPUT
echo "org_id=$org_id" >> $GITHUB_OUTPUT
echo "build_id=$build_id" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit fdd7162

Please sign in to comment.