File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 3333 - name : Install dependencies
3434 run : npm install
3535 - name : Run tests
36- run : npm test
36+ # run: npm test
37+ run : |
38+ BUILD_ID=$(npx percy storybook:start | grep https:\/\/percy.io\/.*\/builds | awk -F "/" '{print $NF}')
39+ # Check if an ID was found and set the environment variable
40+ if [ -n "$BUILD_ID" ]; then
41+ echo "Successfully extracted Percy Build ID: $BUILD_ID"
42+ # Set the environment variable PERCY_BUILD_ID for subsequent steps
43+ echo "PERCY_BUILD_ID=$BUILD_ID" >> $GITHUB_ENV
44+ else
45+ echo "Error: Could not extract Percy Build ID from Percy command output."
46+ fi
3747 env :
3848 PERCY_TOKEN : ${{ secrets.PERCY_TOKEN }}
3949 - name : List files in current directory
4555 run : ./waitForBuildT0End.sh
4656 env :
4757 PERCY_TOKEN : ${{ secrets.PERCY_TOKEN }}
58+ PERCY_BUILD_ID : ${{ env.PERCY_BUILD_ID }}
Original file line number Diff line number Diff line change 33# Dependencies
44/node_modules
55.env
6+ .DS_Store
You can’t perform that action at this time.
0 commit comments