Create force-sync.yml

This commit is contained in:
Mallya, Ameya Keshava
2024-11-19 08:16:40 -08:00
کامیت شده توسط Elwazir, Ammar
والد 53bb4466a4
کامیت f6ca6742a4
@@ -0,0 +1,30 @@
name: Sync Repo
on:
workflow_dispatch:
jobs:
build:
runs-on: self-hosted
steps:
- name: Mirror the repository
env:
SOURCE_REPO: 'https://github.com/ROCm/rocprofiler-sdk-internal.git'
TARGET_REPO: 'https://github.com/AMD-ROCm-Internal/ameya-sdk-test'
SOURCE_ACCESS_TOKEN: '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'
TARGET_ACCESS_TOKEN: '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'
run: |
sudo rm -rf source-repo
# Clone the source repository using the PAT in the URL
SOURCE_REPO_WITH_CREDENTIALS="https://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@github.com/ROCm/rocprofiler-sdk-internal.git"
git clone --mirror "$SOURCE_REPO_WITH_CREDENTIALS" source-repo
cd source-repo
# Set the push URL to the target repository with the PAT in the URL
TARGET_REPO_WITH_CREDENTIALS="https://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@github.com/AMD-ROCm-Internal/ameya-sdk-test.git"
git remote set-url --push origin "$TARGET_REPO_WITH_CREDENTIALS"
# Push the changes using --mirror
git push --mirror