From db0893908462c7495da12001d54e7af1facf94d7 Mon Sep 17 00:00:00 2001 From: Joost de Valk Date: Tue, 23 Jan 2024 18:40:56 +0100 Subject: [PATCH 1/2] Create playground.yml --- .github/workflows/playground.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/playground.yml diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml new file mode 100644 index 000000000..6a5c6b1a4 --- /dev/null +++ b/.github/workflows/playground.yml @@ -0,0 +1,28 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow + +name: Playground +on: + pull_request: + +jobs: + build: + name: Build + uses: johnbillion/plugin-infrastructure/.github/workflows/reusable-build.yml@trunk + master: + name: Leave comment + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + ref: develop + - name: Generate zip + uses: 10up/action-wordpress-plugin-build-zip@stable + id: generate-zip + - name: Leave comment + uses: mshick/add-pr-comment@v2 + with: + message: | + ## WordPress Playground + You can easily [test this pull request on the WordPress Playground](https://playground.wordpress.net/#{"landingPage":"/wp-admin/","features":{"networking":true},"steps":[{"step":"defineWpConfigConsts","consts":{"IS_PLAYGROUND_PREVIEW":true}},{"step":"login","username":"admin","password":"password"},{"step":"installPlugin","pluginZipFile":{"resource":"url","url":"https://bypass-cors.altha.workers.dev/${{ steps.generate-zip.outputs.artifact-url }}"},"options":{"activate":true}}]}), or [download the zip file](${{ github.server_url }}/${{ github.repository }}/archive/${{ github.sha }}.zip). From c77188a4a305b74e2e817aa3b8702e74f11f4331 Mon Sep 17 00:00:00 2001 From: Joost de Valk Date: Tue, 23 Jan 2024 18:42:43 +0100 Subject: [PATCH 2/2] Update playground.yml --- .github/workflows/playground.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playground.yml b/.github/workflows/playground.yml index 6a5c6b1a4..8e08fbfb7 100644 --- a/.github/workflows/playground.yml +++ b/.github/workflows/playground.yml @@ -25,4 +25,4 @@ jobs: with: message: | ## WordPress Playground - You can easily [test this pull request on the WordPress Playground](https://playground.wordpress.net/#{"landingPage":"/wp-admin/","features":{"networking":true},"steps":[{"step":"defineWpConfigConsts","consts":{"IS_PLAYGROUND_PREVIEW":true}},{"step":"login","username":"admin","password":"password"},{"step":"installPlugin","pluginZipFile":{"resource":"url","url":"https://bypass-cors.altha.workers.dev/${{ steps.generate-zip.outputs.artifact-url }}"},"options":{"activate":true}}]}), or [download the zip file](${{ github.server_url }}/${{ github.repository }}/archive/${{ github.sha }}.zip). + You can easily [test this pull request on the WordPress Playground](https://playground.wordpress.net/#{"landingPage":"/wp-admin/","features":{"networking":true},"steps":[{"step":"defineWpConfigConsts","consts":{"IS_PLAYGROUND_PREVIEW":true}},{"step":"login","username":"admin","password":"password"},{"step":"installPlugin","pluginZipFile":{"resource":"url","url":"https://bypass-cors.altha.workers.dev/${{ steps.generate-zip.outputs.artifact-url }}"},"options":{"activate":true}}]}), or [download the zip file](${{ steps.generate-zip.outputs.artifact-url }}).