Merge pull request #1244 from mi6/1236-top-nav-on-website-doesnt-disp… #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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."}' |