Skip to content

Merge pull request #1244 from mi6/1236-top-nav-on-website-doesnt-disp… #64

Merge pull request #1244 from mi6/1236-top-nav-on-website-doesnt-disp…

Merge pull request #1244 from mi6/1236-top-nav-on-website-doesnt-disp… #64

name: Update v3.0.0 Branch
on:
push:
branches:
- develop
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-v3-branch:
runs-on: ubuntu-latest
env:
MERGE_CONFLICTS: false
steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
fetch-depth: 0
- name: Rebase off develop
id: rebase
run: |
git fetch --all
git checkout v3.0.0/develop
git rebase origin/develop || echo "MERGE_CONFLICTS=true" >> "$GITHUB_ENV"
- name: Push changes if no conflicts
if: env.MERGE_CONFLICTS != 'true'
run: |
echo "No conflicts found...Pushing changes..."
git push origin v3.0.0/develop --force
- name: Push any changes and create PR
if: env.MERGE_CONFLICTS == 'true'
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/mi6/ic-design-system/pulls \
-d '{"title":"Resolve conflicts between develop and v3.0.0/develop","head":"develop","base":"v3.0.0/develop","body":"This PR is to resolve conflicts between develop and v3.0.0/develop."}'