From f052dfc12229869c4024922cf786706a22dd21cb Mon Sep 17 00:00:00 2001 From: Pierre-Francois Huillet <120171685+pfhuillet@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:50:46 +0100 Subject: [PATCH] Add sync workflow for deleted events and update build.yml for dependency management --- .github/workflows/build.yml | 33 +++++++++++++++++++++------ .github/workflows/sync_on_deleted.yml | 30 ++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/sync_on_deleted.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 72d9600..02e7deb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,8 +2,9 @@ name: Build on: push: pull_request: - delete: - workflow_dispatch: + +env: + DEPENDENCIES_BRANCH: 20R7 jobs: build: @@ -11,16 +12,24 @@ jobs: 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: @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/sync_on_deleted.yml b/.github/workflows/sync_on_deleted.yml new file mode 100644 index 0000000..f2de386 --- /dev/null +++ b/.github/workflows/sync_on_deleted.yml @@ -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 }} +