Skip to content

Commit baf4b5e

Browse files
committed
Add sync workflow for delete events and update build.yml for internal sync
1 parent 7c1ba6a commit baf4b5e

File tree

2 files changed

+47
-5
lines changed

2 files changed

+47
-5
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,25 @@ name: Build
22
on:
33
push:
44
pull_request:
5-
delete:
6-
workflow_dispatch:
75

86
jobs:
97
build:
108
name: "Build on ${{ matrix.os }}"
119
strategy:
1210
fail-fast: false
1311
matrix:
14-
os: [ macos-latest, windows-latest, ubuntu-24.04 ]
12+
os: [ macOS,Windows,ubuntu-24.04]
1513
runs-on: ${{ matrix.os }}
1614
steps:
1715
- name: Checkout
1816
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
lfs: true
20+
1921
- name: Build
2022
uses: 4d/build4d-action@main
2123
with:
22-
ignore-warnings: true
2324
product-line: vcs
2425
version: vcs
2526
build: official
@@ -33,8 +34,19 @@ jobs:
3334
with:
3435
fetch-depth: 0
3536
lfs: true
36-
- uses: wangchucheng/[email protected]
37+
38+
- name: Get Internal Sync action
39+
uses: actions/checkout@v4
40+
with:
41+
repository: 4d/gitlabsync-action
42+
ref: main
43+
path: .github/workflows/external/sync
44+
token: ${{ secrets.CI_GIT_SYNC }}
45+
46+
- id: Sync
47+
uses: ./.github/workflows/external/sync/
3748
with:
3849
target-url: ${{ secrets.TARGET_URL }}
3950
target-username: ${{ secrets.TARGET_USERNAME }}
4051
target-token: ${{ secrets.TARGET_TOKEN }}
52+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Delete
2+
3+
on:
4+
delete
5+
6+
jobs:
7+
sync:
8+
runs-on: [self-hosted, macOS, ARM64]
9+
name: Git Repo Sync
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
lfs: true
15+
16+
- name: Get Internal Sync action
17+
uses: actions/checkout@v4
18+
with:
19+
repository: 4d/gitlabsync-action
20+
ref: main
21+
path: .github/workflows/external/sync
22+
token: ${{ secrets.CI_GIT_SYNC }}
23+
24+
- id: Sync
25+
uses: ./.github/workflows/external/sync/
26+
with:
27+
target-url: ${{ secrets.TARGET_URL }}
28+
target-username: ${{ secrets.TARGET_USERNAME }}
29+
target-token: ${{ secrets.TARGET_TOKEN }}
30+

0 commit comments

Comments
 (0)