Add a "Hello from my plugin" message to the admin bar #48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Playground Preview | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| - edited | |
| jobs: | |
| create-blueprint: | |
| name: Create Blueprint | |
| runs-on: ubuntu-latest | |
| outputs: | |
| blueprint: ${{ steps.blueprint.outputs.result }} | |
| steps: | |
| - name: Create Blueprint | |
| id: blueprint | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const blueprint = { | |
| steps: [ | |
| { | |
| step: "installPlugin", | |
| pluginData: { | |
| resource: "git:directory", | |
| url: `https://github.com/${context.repo.owner}/${context.repo.repo}.git`, | |
| ref: context.payload.pull_request.head.ref, | |
| path: "/" | |
| } | |
| } | |
| ] | |
| }; | |
| return JSON.stringify(blueprint); | |
| result-encoding: string | |
| playground-preview: | |
| name: Update Playground Preview | |
| needs: create-blueprint | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| issues: write | |
| uses: adamziel/playground-preview/.github/workflows/playground-preview.yml@trunk | |
| with: | |
| mode: "append-to-description" | |
| # plugin-path: . | |
| blueprint: ${{ needs.create-blueprint.outputs.blueprint }} | |