Solved
How to automate repo sync between customer managed git repo (we are using git hub) and Cloud manager repo.
How do I automate repository sync between customer managed git repo (we are using git hub) and AEM Cloud manager repo.
How do I automate repository sync between customer managed git repo (we are using git hub) and AEM Cloud manager repo.
Hello,
you can achieve this by only using Git commands. However, for automation, I recommend using GitHub Actions.
Here is an example workflow to Push a Selected Branch to Adobe Git:
name: Git Sync To Adobe Repo
on:
workflow_dispatch:
push:
branches:
- develop
jobs:
build:
name: Push Selected Branch to Adobe Git
runs-on: ubuntu-latest
steps:
- name: Checkout Git Source Code
run: |
git clone --branch "$GITHUB_REF_NAME" https://${{secrets.GH_USER}}:${{secrets.GH_TOKEN}}@github.com/$GITHUB_REPOSITORY
- name: Push Branch to Adobe Repository
run: |
cd ${{github.event.repository.name}}
git remote add adobe https://${{secrets.ADOBE_GIT_USER}}:${{secrets.ADOBE_GIT_TOKEN}}@git.cloudmanager.adobe.com/${{secrets.ADOBE_GIT_PATH}}
git push adobe "$GITHUB_REF_NAME"
Make sure to add the required GitHub Actions secrets used in the example.
Hope this helps,
Daniel
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.