diff --git a/.github/workflows/fetch_includes.yml b/.github/workflows/fetch_includes.yml index 008dd971e..d5368345e 100644 --- a/.github/workflows/fetch_includes.yml +++ b/.github/workflows/fetch_includes.yml @@ -41,8 +41,11 @@ jobs: - name: Commit to Branch id: commit run: | + git fetch body_message="This Merge Request was triggered by an update to $(git diff --name-only ${GITHUB_REF} | tr '\n' ', ')." + git fetch if [[ $(git log ${GITHUB_REF}..HEAD) ]]; then + git rebase ${BRANCH_NAME} git push origin ${BRANCH_NAME} gh pr create -B ${GITHUB_REF} -H ${BRANCH_NAME} --title "Automatic Asset Update - $(date +'%Y-%m-%d')" --body "${body_message}" -l auto_merge gh workflow run -R nesi/support-docs -r assets-update -f fileList=" " checks.yml