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
name: ADF Schema Drift Check
on:
schedule:
# Mondays at 12:00 UTC. Within issue #731's "within a week of an upstream
# release" acceptance window.
- cron: "0 12 * * 1"
workflow_dispatch:
permissions:
contents: read
issues: write
jobs:
check:
name: Check upstream @atlaskit/adf-schema for drift
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DRIFT_LABEL: adf-schema-drift
steps:
- uses: actions/checkout@v7
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build adf-schema-drift
run: cargo build --release --bin adf-schema-drift
- name: Run drift check
id: drift
run: |
./target/release/adf-schema-drift \
--format both \
--output-dir .
- name: Ensure drift label exists
if: steps.drift.outputs.drift == 'true'
run: |
gh label create "$DRIFT_LABEL" \
--description "Drift between local ADF schema snapshot and upstream @atlaskit/adf-schema" \
--color B60205 \
2>/dev/null || true
- name: Open or update tracking issue
if: steps.drift.outputs.drift == 'true'
run: |
set -euo pipefail
existing=$(
gh issue list \
--label "$DRIFT_LABEL" \
--state open \
--json number \
--jq '.[0].number // empty'
)
title="ADF schema drift: upstream @atlaskit/adf-schema update detected"
if [ -z "$existing" ]; then
gh issue create \
--title "$title" \
--label "$DRIFT_LABEL" \
--body-file drift-report.md
else
gh issue comment "$existing" --body-file drift-report.md
fi