diff --git a/.github/workflows/check-git-apply.yaml b/.github/workflows/check-git-apply.yaml index c70f043c..93e57b90 100644 --- a/.github/workflows/check-git-apply.yaml +++ b/.github/workflows/check-git-apply.yaml @@ -43,7 +43,9 @@ jobs: git config user.email "you@example.com" git config user.name "Your Name" git add . - git commit -m $(cat ../../bromite/build/RELEASE) + VERSION=$(cat ../../bromite/build/RELEASE) + git commit -m $VERSION + git tag -a $VERSION -m $VERSION cd ../.. - name: Apply patches @@ -55,3 +57,36 @@ jobs: export SKIPAUTOGENERATED=true bash ~/bromite-buildtools/apply-all-patch.sh || exit 1 + rm -rf ~/bromite/build/patches-new/ + rm ~/bromite/build/bromite_patches_list_new.txt + + - name: Export patches + run: | + export HOME=$(pwd) + cd ~/chromium/src + + bash ~/bromite-buildtools/export-all-patch.sh + mv build/patches-new/* build/patches + rm -rf ~/bromite/build/patches-new/ + + - name: Export patches + run: | + cd bromite + CHANGES=0 && git diff --quiet || CHANGES=1 + echo "CHANGES=$CHANGES" >> $GITHUB_ENV + + if [[ CHANGES -eq 1 ]]; then + git add . + fi + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3.10.1 + if: env.CHANGES == '1' + with: + path: bromite + add-paths: | + build/patches/*.patch + commit-message: Check git apply result + title: Check git apply result + delete-branch: true + branch-suffix: short-commit-hash