File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5858 set -euxo pipefail
5959 ARTIFACT_URL="https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ github.event.repository.name }}.zip"
6060
61- # Load blueprint and replace plugin name with artifact URL using | as delimiter
62- BLUEPRINT=$(cat .wordpress-org/blueprints/blueprint.json | sed "s|\"progress-planner\"|\"${ARTIFACT_URL}\"|g")
61+ # Use Node.js to parse, modify, and stringify the JSON
62+ BLUEPRINT=$(node -e "
63+ const fs = require('fs');
64+ const blueprint = JSON.parse(fs.readFileSync('.wordpress-org/blueprints/blueprint.json', 'utf8'));
65+ blueprint.plugins = blueprint.plugins.map(plugin =>
66+ plugin === 'progress-planner' ? '$ARTIFACT_URL' : plugin
67+ );
68+ console.log(JSON.stringify(blueprint));
69+ ")
6370
6471 # Base64 encode the blueprint
6572 ENCODED_BLUEPRINT=$(echo -n "$BLUEPRINT" | base64 -w 0)
8188 with :
8289 message : |
8390 **Test on Playground**
84- [Test this pull request on the Playground](https://playground.wordpress.net/?blueprint= ${{ steps.blueprint.outputs.blueprint }})
91+ [Test this pull request on the Playground](https://playground.wordpress.net/# ${{ steps.blueprint.outputs.blueprint }})
8592 or [download the zip](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ github.event.repository.name }}.zip)
You can’t perform that action at this time.
0 commit comments