From 301a7b1e1d668c8537abea81e88553fefaa747b0 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Sat, 23 Dec 2023 13:40:59 +0000 Subject: ci: Post Playground link to PR This commit adds a new workflow `pr-playground.yml` that posts a Wasm-based PR playground link to the PR when it's labeled with `playground`. --- .github/workflows/wasm.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to '.github/workflows/wasm.yml') diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index f69df0f58d..8c946eb0cb 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -140,6 +140,9 @@ jobs: with: name: ruby-wasm-install path: ${{ github.workspace }}/install.tar.gz + - name: Show Playground URL to try the build + run: | + echo "Try on Playground: https://ruby.github.io/play-ruby?run=$GITHUB_RUN_ID" >> $GITHUB_STEP_SUMMARY - name: Run basictest run: wasmtime run ./../build/miniruby --mapdir /::./ -- basictest/test.rb @@ -157,6 +160,16 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot if: ${{ failure() }} + # Workaround for https://github.com/orgs/community/discussions/25220 + - name: Save Pull Request number + if: ${{ github.event_name == 'pull_request' }} + run: echo "${{ github.event.pull_request.number }}" >> ./github-pr-info.txt + - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + if: ${{ github.event_name == 'pull_request' }} + with: + name: github-pr-info + path: github-pr-info.txt + defaults: run: working-directory: build -- cgit v1.2.3