-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.38 KB
/
pull_request.yml
File metadata and controls
52 lines (49 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Add PR to dashboard
permissions:
contents: write
on:
workflow_dispatch:
inputs:
pr-number:
description: 'Pull Request number to download artifacts for'
required: true
jobs:
update-dashboard:
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v5
with:
path: main
- name: Checkout gh-pages
uses: actions/checkout@v5
with:
ref: gh-pages
path: gh-pages
- name: Download and process pull request artifacts
working-directory: ./main
env:
PR_NUMBER: ${{ github.event.inputs.pr-number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm ci
node pull-request
git config --global user.name "GitHub Actions"
git config --global user.email "username@users.noreply.github.com"
git add data
if git diff --cached --quiet; then
echo "No changes to commit."
else
git commit -m "Add artifacts from Playwright's CI"
git push
fi
- name: Publish dashboard
working-directory: ./gh-pages
run: |
git add .
if git diff --cached --quiet; then
echo "No changes to commit."
else
git commit -m "Update dashboard"
git push
fi