Repository navigation
51 lines (48 loc) · 1.62 KB
/
Copy pathproof.yml
File metadata and controls
51 lines (48 loc) · 1.62 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
name: proof
on:
workflow_dispatch:
inputs:
pr:
description: Pull request number to post proof on
required: true
type: string
pull_request:
types: [labeled]
permissions:
contents: write
pull-requests: write
issues: write
jobs:
proof:
if: github.event_name == 'workflow_dispatch' || github.event.label.name == 'proof'
runs-on: ubuntu-latest
timeout-minutes: 15
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number || inputs.pr }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || format('refs/pull/{0}/head', inputs.pr) }}
- uses: ./.github/actions/setup-go-cached
with:
cache-prefix: go-proof
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: '22'
- name: Build web and binaries (no tests)
run: |
(cd web && npm ci --ignore-scripts && npm run build)
go build -buildvcs=false -o levelrail ./cmd/levelrail
go build -buildvcs=false -o levelrail-cli ./cmd/levelrail-cli
- name: Screenshot tools
run: |
pip install shot-scraper playwright
shot-scraper install
sudo apt-get install -y --no-install-recommends webp
- name: Post proof
env:
LEVELRAIL_PROOF_BASE: origin/${{ github.event.pull_request.base.ref || 'main' }}
run: scripts/proof/run.sh --pr "$PR_NUMBER"