Skip to content

Update UE Submodule and PR #52

Update UE Submodule and PR

Update UE Submodule and PR #52

name: Update UE Submodule and PR
on:
workflow_dispatch:
env:
COMMITS_BODY: ''
jobs:
update-submodule:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Setup github SSH for UEPseudo
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.UEPSEUDO_SSH_KEY }}
known_hosts: unnecessary
- name: Checkout
uses: actions/checkout@v4
- name: Initialize submodule
run: |
git submodule update --init --recursive
- name: Get commits between HEAD and main in the submodule
id: submodule-commits
run: |
cd ./deps/first/Unreal
git fetch origin main
git log HEAD..main --pretty="tformat:* %s (**%an**) _%h_" >> submodule-commits.txt
body=$(cat submodule-commits.txt)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo "COMMITS_BODY=$body" >> $GITHUB_ENV
- name: Update submodule to latest commit on main branch
run: |
cd ./deps/first/Unreal
git checkout main
git pull origin main
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
commit-message: Update UE Submodule
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: Update UE Submodule
body: ${{ env.COMMITS_BODY }}
branch: update-ue-submodule
base: main