-
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathvalidate-migration-report-affected.yml
More file actions
77 lines (67 loc) · 2.35 KB
/
Copy pathvalidate-migration-report-affected.yml
File metadata and controls
77 lines (67 loc) · 2.35 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Validate Tailwind Patch Migration Report (Affected Shards)
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
detect-shards:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
has_changes: ${{ steps.resolve.outputs.has_changes }}
matrix: ${{ steps.resolve.outputs.matrix }}
shards: ${{ steps.resolve.outputs.shards }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Resolve affected shards
id: resolve
shell: bash
env:
EVENT_NAME: ${{ github.event_name }}
BASE_SHA: ${{ github.event.pull_request.base.sha || '' }}
HEAD_SHA: ${{ github.sha }}
BASE_REF: ${{ github.base_ref }}
run: |
set -euo pipefail
node packages/tailwindcss-patch/examples/github-actions/scripts/resolve-shards.mjs
validate-migration-report:
needs: detect-shards
if: needs.detect-shards.outputs.has_changes == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.detect-shards.outputs.matrix) }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run migration report checks (${{ matrix.shard.name }})
uses: ./packages/tailwindcss-patch/examples/github-actions/actions/validate-migration-report
with:
setup-pnpm: 'true'
setup-node: 'true'
install-deps: 'true'
node-version: '22.18'
cache-dependency-path: pnpm-lock.yaml
install-command: pnpm install --frozen-lockfile
scope: ${{ matrix.shard.name }}
shard-name: ${{ matrix.shard.name }}
report-file: ${{ matrix.shard.report_file }}
validate-output-file: .tw-patch/validate-result-${{ matrix.shard.name }}.json
- name: Upload validate result (${{ matrix.shard.name }})
if: always()
uses: actions/upload-artifact@v4
with:
name: tw-patch-validate-result-${{ matrix.shard.name }}
path: .tw-patch/validate-result-${{ matrix.shard.name }}.json
no-affected-shards:
needs: detect-shards
if: needs.detect-shards.outputs.has_changes != 'true'
runs-on: ubuntu-latest
steps:
- name: Skip
run: echo "No affected shards for migration report validation."