How do I automate repository sync between customer managed git repo (we are using git hub) and AEM Cloud manager repo.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
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
Cloud manager allows integration of private github repositores, so you can checkout that option
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/implementing/usi...
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
As part of solution you have suggested few steps. Can you please suggest on this. what secrets should be used for https://${{secrets.GH_USER}}:${{secrets.GH_TOKEN}}@github.com/$GITHUB_REPOSITORY
https://${{secrets.ADOBE_GIT_USER}}:${{secrets.ADOBE_GIT_TOKEN}}@git.cloudmanager.adobe.com/${{secre...
secrets of any existing user works or we need to create a new user and use that secrets for this kind of implemntation.
Thankyou,
Bala
Hi @KacharlaBa,
you will need a user who has access to both the GitHub repo and the Adobe repo. You can use your personal account and generate an access token in GitHub/Cloud Manager. However, in that case, your username will appear in GitHub Actions and Git history. A slightly better option would be to create a service account user, assuming you have the time for it
Hope this helps,
Daniel
Views
Likes
Replies