Skip to content

Commit 9b38ba6

Browse files
authored
feat: sync change workflow T1481 (#2356)
1 parent 83b5d23 commit 9b38ba6

File tree

9 files changed

+98
-52
lines changed

9 files changed

+98
-52
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Trigger Sync to EE
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
check-and-trigger:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Get latest commit info
16+
id: commit-info
17+
run: |
18+
COMMIT_MSG=$(git log -1 --format="%s")
19+
COMMIT_AUTHOR=$(git log -1 --format="%an")
20+
21+
echo "message=$COMMIT_MSG" >> $GITHUB_OUTPUT
22+
echo "author=$COMMIT_AUTHOR" >> $GITHUB_OUTPUT
23+
24+
- name: Check if should trigger sync
25+
id: check-trigger
26+
run: |
27+
COMMIT_MSG="${{ steps.commit-info.outputs.message }}"
28+
COMMIT_AUTHOR="${{ steps.commit-info.outputs.author }}"
29+
30+
# Skip if commit message contains [sync] marker or author is the sync bot
31+
# This prevents circular sync loops
32+
if [[ "$COMMIT_MSG" == *"[sync]"* ]] || [[ "$COMMIT_AUTHOR" == "teable-bot" ]]; then
33+
echo "trigger=false" >> $GITHUB_OUTPUT
34+
echo "⏭️ Skipping trigger: commit is from sync workflow"
35+
else
36+
echo "trigger=true" >> $GITHUB_OUTPUT
37+
echo "✅ Will trigger sync to EE"
38+
fi
39+
40+
- name: Trigger sync to EE
41+
if: steps.check-trigger.outputs.trigger == 'true'
42+
run: |
43+
curl -X POST \
44+
-H "Accept: application/vnd.github.v3+json" \
45+
-H "Authorization: token ${{ secrets.BOT_TOKEN }}" \
46+
https://api.github.com/repos/teableio/teable-ee/dispatches \
47+
-d '{"event_type": "sync-from-opensource"}'
48+
49+
echo "✅ Triggered sync workflow in teable-ee"
50+
51+
- name: Skipped
52+
if: steps.check-trigger.outputs.trigger == 'false'
53+
run: echo "⏭️ Sync trigger skipped to avoid circular dependency"
54+

apps/nextjs-app/src/styles/github-markdown.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,4 +1249,4 @@
12491249

12501250
.markdown-body > *:first-child > .heading-element:first-child {
12511251
margin-top: 0 !important;
1252-
}
1252+
}

packages/common-i18n/src/locales/it/oauth.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@
6060
"redirectDescription": "L'autorizzazione reindirizzerà a",
6161
"authorize": "Autorizza"
6262
}
63-
}
63+
}

packages/common-i18n/src/locales/ru/zod.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"regex": "regex",
8989
"datetime": "datetime"
9090
},
91-
"types": {
91+
"types": {
9292
"function": "function",
9393
"number": "number",
9494
"string": "string",

packages/common-i18n/src/locales/uk/plugin.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"name": {
1515
"label": "Назва",
1616
"description": "Назва плагіна"
17-
},
17+
},
1818
"description": {
1919
"label": "Опис",
2020
"description": "Короткий опис плагіна"
@@ -52,5 +52,5 @@
5252
"markdown": {
5353
"write": "Писати",
5454
"preview": "Перегляд"
55-
}
56-
}
55+
}
56+
}

packages/common-i18n/src/locales/uk/token.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@
5656
"title": "Ви впевнені, що хочете видалити цей токен?",
5757
"description": "Будь-які програми або скрипти, які використовують цей токен, більше не зможуть отримати доступ до API Teable. Ви не можете скасувати цю дію."
5858
}
59-
}
59+
}

packages/ui-lib/src/_stories/Introduction.stories.mdx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -181,22 +181,14 @@ We recommend building UIs with a [**component-driven**](https://componentdriven.
181181
Configure, customize, and extend
182182
</span>
183183
</a>
184-
<a
185-
className="link-item"
186-
href="https://storybook.js.org/tutorials/"
187-
target="_blank"
188-
>
184+
<a className="link-item" href="https://storybook.js.org/tutorials/" target="_blank">
189185
<img src={Direction} alt="direction" />
190186
<span>
191187
<strong>In-depth guides</strong>
192188
Best practices from leading teams
193189
</span>
194190
</a>
195-
<a
196-
className="link-item"
197-
href="https://github.com/storybookjs/storybook"
198-
target="_blank"
199-
>
191+
<a className="link-item" href="https://github.com/storybookjs/storybook" target="_blank">
200192
<img src={Code} alt="code" />
201193
<span>
202194
<strong>GitHub project</strong>

packages/ui-lib/src/shadcn/global.shadcn.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@
9191
body {
9292
@apply bg-background text-foreground;
9393
}
94-
}
94+
}
Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,76 @@
11
/** @type {import('tailwindcss').Config} */
22
module.exports = {
3-
darkMode: ["class"],
3+
darkMode: ['class'],
44
content: [
55
'./pages/**/*.{ts,tsx}',
66
'./components/**/*.{ts,tsx}',
77
'./app/**/*.{ts,tsx}',
88
'./src/**/*.{ts,tsx}',
9-
],
9+
],
1010
theme: {
1111
container: {
1212
center: true,
13-
padding: "2rem",
13+
padding: '2rem',
1414
screens: {
15-
"2xl": "1400px",
15+
'2xl': '1400px',
1616
},
1717
},
1818
extend: {
1919
colors: {
20-
border: "hsl(var(--border))",
21-
input: "hsl(var(--input))",
22-
ring: "hsl(var(--ring))",
23-
background: "hsl(var(--background))",
24-
foreground: "hsl(var(--foreground))",
20+
border: 'hsl(var(--border))',
21+
input: 'hsl(var(--input))',
22+
ring: 'hsl(var(--ring))',
23+
background: 'hsl(var(--background))',
24+
foreground: 'hsl(var(--foreground))',
2525
primary: {
26-
DEFAULT: "hsl(var(--primary))",
27-
foreground: "hsl(var(--primary-foreground))",
26+
DEFAULT: 'hsl(var(--primary))',
27+
foreground: 'hsl(var(--primary-foreground))',
2828
},
2929
secondary: {
30-
DEFAULT: "hsl(var(--secondary))",
31-
foreground: "hsl(var(--secondary-foreground))",
30+
DEFAULT: 'hsl(var(--secondary))',
31+
foreground: 'hsl(var(--secondary-foreground))',
3232
},
3333
destructive: {
34-
DEFAULT: "hsl(var(--destructive))",
35-
foreground: "hsl(var(--destructive-foreground))",
34+
DEFAULT: 'hsl(var(--destructive))',
35+
foreground: 'hsl(var(--destructive-foreground))',
3636
},
3737
muted: {
38-
DEFAULT: "hsl(var(--muted))",
39-
foreground: "hsl(var(--muted-foreground))",
38+
DEFAULT: 'hsl(var(--muted))',
39+
foreground: 'hsl(var(--muted-foreground))',
4040
},
4141
accent: {
42-
DEFAULT: "hsl(var(--accent))",
43-
foreground: "hsl(var(--accent-foreground))",
42+
DEFAULT: 'hsl(var(--accent))',
43+
foreground: 'hsl(var(--accent-foreground))',
4444
},
4545
popover: {
46-
DEFAULT: "hsl(var(--popover))",
47-
foreground: "hsl(var(--popover-foreground))",
46+
DEFAULT: 'hsl(var(--popover))',
47+
foreground: 'hsl(var(--popover-foreground))',
4848
},
4949
card: {
50-
DEFAULT: "hsl(var(--card))",
51-
foreground: "hsl(var(--card-foreground))",
50+
DEFAULT: 'hsl(var(--card))',
51+
foreground: 'hsl(var(--card-foreground))',
5252
},
5353
},
5454
borderRadius: {
55-
lg: "var(--radius)",
56-
md: "calc(var(--radius) - 2px)",
57-
sm: "calc(var(--radius) - 4px)",
55+
lg: 'var(--radius)',
56+
md: 'calc(var(--radius) - 2px)',
57+
sm: 'calc(var(--radius) - 4px)',
5858
},
5959
keyframes: {
60-
"accordion-down": {
60+
'accordion-down': {
6161
from: { height: 0 },
62-
to: { height: "var(--radix-accordion-content-height)" },
62+
to: { height: 'var(--radix-accordion-content-height)' },
6363
},
64-
"accordion-up": {
65-
from: { height: "var(--radix-accordion-content-height)" },
64+
'accordion-up': {
65+
from: { height: 'var(--radix-accordion-content-height)' },
6666
to: { height: 0 },
6767
},
6868
},
6969
animation: {
70-
"accordion-down": "accordion-down 0.2s ease-out",
71-
"accordion-up": "accordion-up 0.2s ease-out",
70+
'accordion-down': 'accordion-down 0.2s ease-out',
71+
'accordion-up': 'accordion-up 0.2s ease-out',
7272
},
7373
},
7474
},
75-
plugins: [require("tailwindcss-animate")],
76-
}
75+
plugins: [require('tailwindcss-animate')],
76+
};

0 commit comments

Comments
 (0)