mirror of
https://github.com/labring/sealos.git
synced 2026-08-29 01:39:49 +08:00
f95851de89
* fix(sync_code): add conditional check for repository owner in workflow Signed-off-by: Yun Pan <dinoallo@netc.it> * fix(workflows): add repository owner check for E2E tests in k3s and k8s workflows Signed-off-by: Yun Pan <dinoallo@netc.it> --------- Signed-off-by: Yun Pan <dinoallo@netc.it>
34 lines
1.0 KiB
YAML
34 lines
1.0 KiB
YAML
name: Sync Code
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- lifecycle/staging/src/github.com/labring/**
|
|
- LICENSE.md
|
|
- .github/workflows/sync_code.yml
|
|
- .github/sync_code.yml
|
|
workflow_dispatch:
|
|
jobs:
|
|
sync:
|
|
# Only run this workflow when the repository owner is `labring`.
|
|
# This prevents the sync action from running in forks or mirrors owned by others.
|
|
if: github.repository_owner == 'labring'
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Run GitHub File Sync
|
|
# Can update to v1 when https://github.com/BetaHuhn/repo-file-sync-action/issues/168 is resolved
|
|
uses: BetaHuhn/repo-file-sync-action@v1
|
|
with:
|
|
GH_PAT: ${{ secrets.SYNC_CODE_PAT }}
|
|
CONFIG_PATH: .github/sync_code.yml
|
|
ORIGINAL_MESSAGE: true
|
|
SKIP_PR: true
|
|
COMMIT_EACH_FILE: false
|
|
COMMIT_BODY: "Change-type: patch"
|
|
GIT_EMAIL: "sealos-ci-robot@sealos.io"
|
|
GIT_USERNAME: "sealos-ci-robot"
|