mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
add workflow to rollup changes from master -> v9 (#1268)
This commit is contained in:
parent
1346daccf8
commit
6f80b4c8a9
1 changed files with 48 additions and 0 deletions
48
.github/workflows/rollup.yml
vendored
Normal file
48
.github/workflows/rollup.yml
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
name: Rollup changes to next version
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
branches:
|
||||
- v9
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
ref: ${{ matrix.branches }}
|
||||
token: ${{ secrets.UPDATE_PAT }}
|
||||
- name: Create update branch
|
||||
run: git checkout -b ${{ matrix.branches }}/rollup
|
||||
- name: Initialize mandatory git config
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email noreply@github.com
|
||||
git config --global pull.rebase false
|
||||
- name: Update submodule
|
||||
run: |
|
||||
git fetch
|
||||
git merge -s recursive -X ours origin/master
|
||||
git push origin ${{ matrix.branches }}/rollup --force
|
||||
- name: Create PR
|
||||
run: |
|
||||
echo ${{ secrets.UPDATE_PAT }} | gh auth login --with-token
|
||||
prNumber=$(gh pr list --base ${{ matrix.branches }} --head ${{ matrix.branches }}/rollup --state open --json number --template "{{range .}}{{.number}}{{end}}")
|
||||
if [ -z "$prNumber" ]; then
|
||||
echo "No PR found, creating one"
|
||||
gh pr create --head ${{ matrix.branches }}/rollup --title "[${{ matrix.branches }}] Rollup changes from master" --body "" --base ${{ matrix.branches }}
|
||||
else
|
||||
echo "PR already exists, ignoring"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue