mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/17396] Add workflow for merging 3.3.x into master
PHPBB-17396
This commit is contained in:
parent
c5f13dd327
commit
f55d747bb4
1 changed files with 45 additions and 0 deletions
45
.github/workflows/merge_3.3.x_to_master.yml
vendored
Normal file
45
.github/workflows/merge_3.3.x_to_master.yml
vendored
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
name: Merge 3.3.x into master
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 3.3.x
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
merge-branch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout the repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Fetch the latest commit information
|
||||||
|
id: get-commit-info
|
||||||
|
run: |
|
||||||
|
# Get the latest commit SHA and its author details
|
||||||
|
COMMIT_SHA=$(git rev-parse HEAD)
|
||||||
|
COMMIT_AUTHOR_NAME=$(git log -1 --pretty=format:'%an' $COMMIT_SHA)
|
||||||
|
COMMIT_AUTHOR_EMAIL=$(git log -1 --pretty=format:'%ae' $COMMIT_SHA)
|
||||||
|
|
||||||
|
# Save them as output for later steps
|
||||||
|
echo "commit_sha=$COMMIT_SHA" >> $GITHUB_ENV
|
||||||
|
echo "commit_author_name=$COMMIT_AUTHOR_NAME" >> $GITHUB_ENV
|
||||||
|
echo "commit_author_email=$COMMIT_AUTHOR_EMAIL" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Set up Git with the pull request author's info
|
||||||
|
run: |
|
||||||
|
git config --global user.name "${{ env.commit_author_name }}"
|
||||||
|
git config --global user.email "${{ env.commit_author_email }}"
|
||||||
|
|
||||||
|
- name: Fetch all branches
|
||||||
|
run: git fetch --all
|
||||||
|
|
||||||
|
- name: Merge 3.3.x into master
|
||||||
|
run: |
|
||||||
|
git checkout master
|
||||||
|
git merge --no-ff 3.3.x
|
||||||
|
|
||||||
|
- name: Push changes to master
|
||||||
|
run: git push origin master
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
Loading…
Add table
Reference in a new issue