Skip to content

Commit

Permalink
Enhance build workflow with dependency branch and sync on delete func…
Browse files Browse the repository at this point in the history
…tionality
  • Loading branch information
pfhuillet committed Dec 17, 2024
1 parent 0d580f5 commit e9b5a9e
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 7 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,34 @@ name: Build
on:
push:
pull_request:
delete:
workflow_dispatch:

env:
DEPENDENCIES_BRANCH: 20R6

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: Check out 4D-SVG
uses: actions/checkout@v4
with:
repository: 4d/4D-SVG
path: Components/SVG.4dbase
path: Components/4D-SVG.4dbase
ref : ${{ env.DEPENDENCIES_BRANCH }}
fetch-depth: 0
lfs: true

- name: Build
uses: 4d/build4d-action@main
with:
Expand All @@ -37,9 +46,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
name: Sync
uses: ./.github/workflows/external/sync/
with:
target-url: ${{ secrets.TARGET_URL }}
target-username: ${{ secrets.TARGET_USERNAME }}
target-token: ${{ secrets.TARGET_TOKEN }}

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 e9b5a9e

Please sign in to comment.