Skip to content

Commit

Permalink
Add sync job for delete events and update build.yml for OS naming
Browse files Browse the repository at this point in the history
  • Loading branch information
pfhuillet committed Dec 11, 2024
1 parent b9b658f commit 4a3dae4
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ 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
Expand All @@ -28,6 +26,7 @@ jobs:
version: vcs
build: official
token: ${{ secrets.DLTK }}

sync:
needs: ["build"]
runs-on: [self-hosted, macOS, ARM64]
Expand All @@ -36,8 +35,18 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- uses: wangchucheng/git-repo-sync@v0.1.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 }}
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/sync_on_delete.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 4a3dae4

Please sign in to comment.