Skip to content

Commit

Permalink
Refactor GitHub workflows: remove sync_4D-WritePro-Interface.yml, add…
Browse files Browse the repository at this point in the history
… build.yml and sync_on_deleted.yml
  • Loading branch information
pfhuillet committed Dec 17, 2024
1 parent 908cf7b commit 1f73cae
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 20 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build
on:
push:
pull_request:

env:
DEPENDENCIES_BRANCH: 20.x

jobs:
build:
name: "Build on ${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os: [ macOS,Windows]
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/4D-SVG.4dbase
ref : ${{ env.DEPENDENCIES_BRANCH }}
fetch-depth: 0
lfs: true

- name: Build
uses: 4d/build4d-action@main
with:
product-line: vcs
version: vcs
build: official
token: ${{ secrets.DLTK }}
sync:
needs: ["build"]
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
name: Sync
uses: ./.github/workflows/external/sync/
with:
target-url: ${{ secrets.TARGET_URL }}
target-username: ${{ secrets.TARGET_USERNAME }}
target-token: ${{ secrets.TARGET_TOKEN }}
20 changes: 0 additions & 20 deletions .github/workflows/sync_4D-WritePro-Interface.yml

This file was deleted.

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 1f73cae

Please sign in to comment.