Skip to content

Update Pleye reporter #213

Update Pleye reporter

Update Pleye reporter #213

name: Update Pleye reporter
on:
workflow_dispatch:
inputs:
commit:
type: boolean
description: If true, don't create a PR, commit to main directly instead
schedule:
- cron: '0 0 * * *' # Daily
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
commit:
name: Commit
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
with:
ssh-key: ${{ secrets.AUTOCOMMITS_DEPLOY_KEY }}
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: .bun-version
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Get current Pleye version on server
id: pleye
run: |
VERSION=$(curl -fsSL https://pleye.gwen.works/version)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- run: |
curl -fsSL https://pleye.gwen.works/reporter.js?no-version -o tests/reporters/pleye.js
bunx prettier --write tests/reporters/pleye.js
- if: inputs.commit
name: Commit changes
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7
with:
commit_message: |
👽 Update Pleye's Playwright reporter
Pleye server version is ${{ steps.pleye.outputs.version }}
- if: ${{ !inputs.commit }}
name: Propose changes
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8
with:
add-paths: tests/reporters/pleye.js
commit-message: 👽 Update Pleye's Playwright reporter
branch: update-pleye-reporter
title: '👽 Update Pleye reporter'
body: |
https://pleye.gwen.works has a new version of the Playwright reporter.
This PR updates it to the current version that the server provides.
Pleye version is ${{ steps.pleye.outputs.version }}