Skip to content

Commit

Permalink
Update update_master.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tsi authored Jul 14, 2024
1 parent fe50f00 commit a977216
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions .github/workflows/update_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,21 @@ jobs:
update_master_and_create_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
with:
ref: master
fetch-depth: 0

- name: Merge edge into master
run: |
git config user.name "cloudinary-jenkins"
git config user.email "[email protected]"
git checkout -b update-master
git merge -X ours --no-edit origin/edge || true
- name: Auto-resolve conflicts

- name: Fetch all branches
run: |
if git status | grep -q 'You have unmerged paths'; then
git status | grep 'both modified:' | awk '{print $3}' | xargs git checkout --ours
git add .
git commit -m "Auto-resolve conflicts"
fi
git fetch --all
- name: Push changes
- name: Create update branch
run: |
git push origin update-master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
git config user.name github-actions
git config user.email [email protected]
git checkout -b update-master origin/master || git checkout -b update-master
git reset --hard origin/edge
git push -f origin update-master
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
Expand Down

0 comments on commit a977216

Please sign in to comment.