Skip to content

Commit 0dd6faf

Browse files
Merge branch 'main' into fix-preserve-whitespaces-infotext
2 parents 3cb6f02 + b8b453d commit 0dd6faf

File tree

171 files changed

+12275
-2400
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+12275
-2400
lines changed

.changeset/cold-chairs-tease.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.config/.jscpd.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"**/navigation-items.ts",
3030
"**/node_modules/**",
3131
"**/output/**",
32+
"**/*storybooks/**",
3233
"**/patternhub/**/components/**",
3334
"**/playwright-report/**",
3435
"**/public/**",

.config/ignores.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const ignoreFolders = [
1414
'build-outputs/**/*',
1515
'build-showcases/**/*',
1616
'output/**/*',
17-
'**/playwright.*.ts'
17+
'**/playwright.*.ts',
18+
'playwright-report/**/*'
1819
];
1920

2021
export default ignoreFolders;

.github/actions/auto-commit/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ runs:
6565
NEW_PR_BRANCH: ${{ inputs.branch-name }}
6666
BASE_BRANCH: ${{ github.head_ref }}
6767
run: |
68-
gh pr create --base "$BASE_BRANCH" --head "$NEW_PR_BRANCH" --title "Automated PR: $COMMIT_MESSAGE" --body "This PR was created automatically by a GitHub Action."
68+
PR_BODY="This PR was created automatically by a GitHub Action.
69+
70+
Target PR (this PR will be merged into): <https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}>"
71+
72+
# Create the PR and capture its URL
73+
gh pr create --base "$BASE_BRANCH" --head "$NEW_PR_BRANCH" --title "Automated PR: $COMMIT_MESSAGE" --body "$PR_BODY"
6974
7075
# https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow
7176
- name: 🧬 Generate a token

.github/actions/extract-branch/action.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/00-init.yml

Lines changed: 142 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,158 @@ permissions:
55

66
on:
77
workflow_call:
8-
8+
inputs:
9+
release:
10+
required: false
11+
default: false
12+
type: boolean
13+
outputs:
14+
branchName:
15+
description: "Branch or Tag name"
16+
value: ${{ jobs.init.outputs.name }}
17+
baseUrl:
18+
description: "Base URL for the repository"
19+
value: ${{ jobs.init.outputs.baseUrl }}
20+
repoName:
21+
description: "Repository name"
22+
value: ${{ jobs.init.outputs.repoName }}
23+
repoOwner:
24+
description: "Repository owner"
25+
value: ${{ jobs.init.outputs.repoOwner }}
26+
playwrightVersion:
27+
description: "Current playwright version"
28+
value: ${{ jobs.init.outputs.version }}
29+
test-ally:
30+
description: "If aria-snapshots are changed"
31+
value: ${{ jobs.init.outputs.test-ally }}
32+
# Publish outputs
33+
release:
34+
description: "If the current tag is a release"
35+
value: ${{ jobs.publish.outputs.release }}
36+
preRelease:
37+
description: "If the current tag is a pre-release"
38+
value: ${{ jobs.publish.outputs.preRelease }}
39+
version:
40+
description: "Which version has the tag"
41+
value: ${{ jobs.publish.outputs.version }}
942
jobs:
1043
init:
1144
name: Init
45+
outputs:
46+
name: ${{ steps.result.outputs.name }}
47+
baseUrl: ${{ steps.result.outputs.baseUrl }}
48+
repoName: ${{ steps.result.outputs.repo }}
49+
repoOwner: ${{ steps.result.outputs.owner }}
50+
version: ${{ steps.version.outputs.version }}
51+
test-ally: ${{ steps.ally.outputs.test-ally }}
1252
runs-on: ubuntu-24.04 # Use Ubuntu 24.04 explicitly
1353
steps:
1454
- name: ⏬ Checkout repo
1555
uses: actions/checkout@v5
56+
with:
57+
fetch-depth: 0
58+
fetch-tags: false
59+
60+
# https://github.com/marketplace/actions/trufflehog-oss#advanced-usage-scan-entire-branch
61+
- name: 🐷 TruffleHog OSS
62+
if: ${{ github.event.pull_request != null && github.event.pull_request.head.repo.owner.login == 'db-ux-design-system' }} # only scan on pull-requests
63+
uses: trufflesecurity/trufflehog@main
64+
with:
65+
# Setting base to an empty string scans the entire branch, per TruffleHog OSS advanced usage:
66+
# https://github.com/marketplace/actions/trufflehog-oss#advanced-usage-scan-entire-branch
67+
base: ""
68+
head: ${{ github.ref_name }}
69+
extra_args: --results=verified,unknown
1670

1771
- name: 🔄 Init Cache Default
1872
uses: ./.github/actions/npm-cache
1973
env:
2074
ASSET_INIT_VECTOR: ${{ secrets.ASSET_INIT_VECTOR }}
2175
ASSET_PASSWORD: ${{ secrets.ASSET_PASSWORD }}
76+
77+
- name: 🛤 Extract name and base
78+
id: extract-name-and-base
79+
uses: actions/github-script@v8
80+
env:
81+
GITHUB_REF: ${{ github.ref }}
82+
RELEASE: ${{ inputs.release }}
83+
with:
84+
script: |
85+
const { default: extractNameAndBaseUrl } = await import('${{ github.workspace }}/scripts/github/extract-name-and-base-url.js');
86+
return extractNameAndBaseUrl(context);
87+
88+
- name: ✒️ Write to output
89+
id: result
90+
env:
91+
RESULT: ${{ steps.extract-name-and-base.outputs.result }}
92+
run: |
93+
echo "name=$(echo $RESULT | jq -r .name)" >> $GITHUB_OUTPUT
94+
echo "baseUrl=$(echo $RESULT | jq -r .baseUrl)" >> $GITHUB_OUTPUT
95+
echo "repo=$(echo $RESULT | jq -r .repo)" >> $GITHUB_OUTPUT
96+
echo "owner=$(echo $RESULT | jq -r .owner)" >> $GITHUB_OUTPUT
97+
98+
- name: 🪁 Get playwright version
99+
id: version
100+
run: |
101+
OUTPUT=$(npx --no tsx scripts/github/get-playwright-version.ts)
102+
echo "version=$OUTPUT" >> $GITHUB_OUTPUT
103+
104+
- name: 👩 Should Test a11y
105+
id: ally
106+
shell: bash
107+
run: |
108+
ARIA_MAIN=$(npx --no tsx scripts/github/snapshot-changes/check-main-aria.ts)
109+
echo "test-ally=$ARIA_MAIN"
110+
echo "test-ally=$ARIA_MAIN" >> $GITHUB_OUTPUT
111+
112+
publish:
113+
name: Get and save publish version
114+
runs-on: ubuntu-24.04 # Use Ubuntu 24.04 explicitly
115+
if: ${{ inputs.release }}
116+
outputs:
117+
release: ${{ steps.releaseCheck.outputs.release }}
118+
preRelease: ${{ steps.releaseCheck.outputs.preRelease }}
119+
version: ${{ steps.getVersion.outputs.version }}
120+
steps:
121+
- name: ⏬ Checkout repo
122+
uses: actions/checkout@v5
123+
124+
- name: 🔄 Init Cache
125+
uses: ./.github/actions/npm-cache
126+
127+
- name: 💃🕺 Check if release or prerelease
128+
id: releaseCheck
129+
run: |
130+
OUTPUT=$(npx --no tsx scripts/github/get-release.ts)
131+
if [[ $OUTPUT == "RELEASE" ]];
132+
then
133+
echo "release=true" >> $GITHUB_OUTPUT
134+
elif [[ $OUTPUT == "PRE_RELEASE" ]];
135+
then
136+
echo "preRelease=true" >> $GITHUB_OUTPUT
137+
fi
138+
env:
139+
GITHUB_REF: ${{ github.ref }}
140+
GITHUB_ACTOR: ${{ github.actor }}
141+
GITHUB_COMMITISH: ${{ github.event.release.target_commitish }}
142+
GITHUB_PRE_RELEASE: ${{ github.event.release.prerelease }}
143+
144+
- name: ↔ Extract tag name
145+
shell: bash
146+
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
147+
id: extractTag
148+
149+
- name: 🏷 Get and Set Package Version on Env
150+
id: getVersion
151+
env:
152+
RELEASE: ${{ steps.releaseCheck.outputs.release }}
153+
PRE_RELEASE: ${{ steps.releaseCheck.outputs.preRelease }}
154+
TAG: ${{ steps.extractTag.outputs.tag }}
155+
run: |
156+
OUTPUT=$(npx --no tsx scripts/github/package-version.ts)
157+
echo "version=$OUTPUT" >> $GITHUB_OUTPUT
158+
159+
- name: 🌳 Log Valid Version
160+
env:
161+
VALID_SEMVER_VERSION: ${{ steps.getVersion.outputs.version }}
162+
run: echo "$VALID_SEMVER_VERSION"

.github/workflows/00-scan-secrets.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/01-build-outputs.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ jobs:
5454
name: db-ux-output
5555
path: output
5656

57-
- name: 📥 Install output dependencies
58-
uses: bahmutov/npm-install@v1
59-
with:
60-
install-command: npm i
61-
6257
- name: 🔨 Build outputs
6358
run: |
6459
npm run generate:agent

.github/workflows/01-build-patternhub.yml

Lines changed: 3 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,14 @@ permissions:
77
on:
88
workflow_call:
99
inputs:
10-
release:
11-
required: false
12-
default: "false"
10+
baseUrl:
11+
required: true
1312
type: string
14-
preRelease:
15-
required: false
16-
default: "false"
17-
type: string
18-
outputs:
19-
path:
20-
description: "Base path for patternhub"
21-
value: ${{ jobs.build-patternhub.outputs.path }}
2213

2314
jobs:
2415
build-patternhub:
2516
name: Build Patternhub
2617
runs-on: ubuntu-24.04 # Use Ubuntu 24.04 explicitly
27-
outputs:
28-
path: ${{ steps.build.outputs.path }}
2918
steps:
3019
- name: ⏬ Checkout repo
3120
uses: actions/checkout@v5
@@ -51,47 +40,12 @@ jobs:
5140
name: db-ux-components-build
5241
path: packages/components/build
5342

54-
- name: ↔ Extract branch name
55-
uses: ./.github/actions/extract-branch
56-
id: extract_branch
57-
58-
- name: ↔ Extract branch/tag name
59-
shell: bash
60-
env:
61-
RELEASE: ${{ inputs.release }}
62-
PRE_RELEASE: ${{ inputs.preRelease }}
63-
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch-name }}
64-
run: |
65-
if [[ $RELEASE == "true" || $PRE_RELEASE == "true" ]]
66-
then
67-
echo "name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
68-
else
69-
echo "name=${BRANCH_NAME}" >> $GITHUB_OUTPUT
70-
fi
71-
id: extract
72-
73-
- name: 🛤 Get base path
74-
uses: actions/github-script@v8
75-
env:
76-
NAME: ${{ steps.extract.outputs.name }}
77-
RELEASE: ${{ inputs.release }}
78-
PRE_RELEASE: ${{ inputs.preRelease }}
79-
id: base-path
80-
with:
81-
result-encoding: string
82-
script: |
83-
var path = 'review';
84-
if(process.env.RELEASE === "true" || process.env.PRE_RELEASE === "true") {
85-
path = 'version'
86-
}
87-
return `/${context?.payload?.repository?.name}/${path}/${process.env.NAME}`
88-
8943
- name: 🔨 Build Patternhub
9044
id: build
9145
env:
9246
ASSET_INIT_VECTOR: ${{ secrets.ASSET_INIT_VECTOR }}
9347
ASSET_PASSWORD: ${{ secrets.ASSET_PASSWORD }}
94-
NEXT_PUBLIC_BASE_PATH: ${{ steps.base-path.outputs.result }}
48+
NEXT_PUBLIC_BASE_PATH: ${{ inputs.baseUrl }}
9549
run: |
9650
node node_modules/@db-ux/db-theme-fonts/build/scripts/index.js
9751
node node_modules/@db-ux/db-theme-icons/build/scripts/index.js

0 commit comments

Comments
 (0)