From 6d820ffcff83f0708774cea60cad7934d98907d2 Mon Sep 17 00:00:00 2001 From: Alexander Poddubny Date: Mon, 7 Oct 2024 17:02:44 -0700 Subject: [PATCH 1/2] Adding a buildspec for repo mirroring job --- .github/workflows/mirror-buildspec.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/workflows/mirror-buildspec.yml diff --git a/.github/workflows/mirror-buildspec.yml b/.github/workflows/mirror-buildspec.yml new file mode 100644 index 00000000000..e69de29bb2d From ec263d837ffcc29bb4361c62cf290c1e0d2bce8e Mon Sep 17 00:00:00 2001 From: Alexander Poddubny Date: Mon, 7 Oct 2024 17:06:08 -0700 Subject: [PATCH 2/2] Added force option to push --- .github/workflows/mirror-buildspec.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/mirror-buildspec.yml b/.github/workflows/mirror-buildspec.yml index e69de29bb2d..a537f5bfd99 100644 --- a/.github/workflows/mirror-buildspec.yml +++ b/.github/workflows/mirror-buildspec.yml @@ -0,0 +1,15 @@ +version: 0.2 + +phases: + install: + runtime-versions: + nodejs: 14 + pre_build: + commands: + - git config --global user.name "Isaac LAB CI Bot" + - git config --global user.email "isaac-lab-ci-bot@nvidia.com" + build: + commands: + - git remote set-url origin https://github.com/${TARGET_REPO}.git + - git checkout $SOURCE_BRANCH + - git push --force https://$GITHUB_TOKEN@github.com/${TARGET_REPO}.git $SOURCE_BRANCH:$TARGET_BRANCH