Create sync-fork.yml
parent
678fb6d707
commit
3dbdc99296
|
@ -0,0 +1,47 @@
|
||||||
|
#Author: Nefi Munoz <nmunoz@suse.com>
|
||||||
|
name: Sync Fork
|
||||||
|
|
||||||
|
on:
|
||||||
|
# schedule:
|
||||||
|
# Runs every day at midnight UTC
|
||||||
|
# - cron: '0 0 * * *'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout main-source branch
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: main-source # branch you want to sync
|
||||||
|
repository: nflondo/partner-charts # your forked repository URL
|
||||||
|
- name: Configure Git
|
||||||
|
run: |
|
||||||
|
git config --global user.name "github-actions[bot]"
|
||||||
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
- name: Fetch upstream changes for main-source branch
|
||||||
|
run: |
|
||||||
|
git remote add upstream https://github.com/rancher/partner-charts.git # URL of upstream repository
|
||||||
|
git fetch upstream main-source
|
||||||
|
- name: Merge upstream changes into main branch
|
||||||
|
run: |
|
||||||
|
git checkout main-source
|
||||||
|
git merge upstream/main-source --allow-unrelated-histories --no-edit
|
||||||
|
git push origin main-source
|
||||||
|
- name: Checkout main branch
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: main # branch you want to sync
|
||||||
|
repository: nflondo/partner-charts # your forked repository URL
|
||||||
|
- name: Fetch upstream changes for main branch
|
||||||
|
run: |
|
||||||
|
git remote add upstream https://github.com/rancher/partner-charts.git # URL of upstream repository
|
||||||
|
git fetch upstream main
|
||||||
|
- name: Merge upstream changes into develop branch
|
||||||
|
run: |
|
||||||
|
git checkout main
|
||||||
|
git merge upstream/main --allow-unrelated-histories --no-edit
|
||||||
|
git push origin main
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue