Skip to content

Commit

Permalink
Add sync workflow for deleted events and update build.yml for interna…
Browse files Browse the repository at this point in the history
…l sync
  • Loading branch information
pfhuillet committed Dec 17, 2024
1 parent cc72ec4 commit 010d2cc
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 5 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@ name: Build
on:
push:
pull_request:
delete:
workflow_dispatch:

jobs:
build:
name: "Build on ${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os: [ macos-latest, windows-latest, ubuntu-24.04 ]
os: [ macOS,Windows,ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true

- name: Build
uses: 4d/build4d-action@main
with:
ignore-warnings: true
product-line: vcs
version: vcs
build: official
Expand All @@ -33,8 +34,19 @@ jobs:
with:
fetch-depth: 0
lfs: true
- uses: wangchucheng/git-repo-sync@v0.1.0

- name: Get Internal Sync action
uses: actions/checkout@v4
with:
repository: 4d/gitlabsync-action
ref: main
path: .github/workflows/external/sync
token: ${{ secrets.CI_GIT_SYNC }}

- id: Sync
uses: ./.github/workflows/external/sync/
with:
target-url: ${{ secrets.TARGET_URL }}
target-username: ${{ secrets.TARGET_USERNAME }}
target-token: ${{ secrets.TARGET_TOKEN }}

30 changes: 30 additions & 0 deletions .github/workflows/sync_on_deleted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Delete

on:
delete

jobs:
sync:
runs-on: [self-hosted, macOS, ARM64]
name: Git Repo Sync
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true

- name: Get Internal Sync action
uses: actions/checkout@v4
with:
repository: 4d/gitlabsync-action
ref: main
path: .github/workflows/external/sync
token: ${{ secrets.CI_GIT_SYNC }}

- id: Sync
uses: ./.github/workflows/external/sync/
with:
target-url: ${{ secrets.TARGET_URL }}
target-username: ${{ secrets.TARGET_USERNAME }}
target-token: ${{ secrets.TARGET_TOKEN }}

0 comments on commit 010d2cc

Please sign in to comment.