Skip to content

Commit

Permalink
Auto PR
Browse files Browse the repository at this point in the history
  • Loading branch information
beef9999 committed Oct 25, 2023
1 parent fe71b20 commit 3ebddbb
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/auto-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Auto PR

on:
push:
branches:
- 'release/*'

jobs:
auto-pr:
runs-on: ubuntu-latest

env:
GH_TOKEN: ${{ github.token }}

steps:
- uses: actions/checkout@v3

- name: Create Pull Request to the next higher release version

run: |
git fetch
RELEASE_VERSIONS=$(git branch -r | grep 'release/' | cut -d '/' -f 3 | sort -V)
CURRENT_VERSION=$(echo $GITHUB_REF | rev | cut -d '/' -f 1 | rev)
ME_AND_MY_NEXT=$(echo "$RELEASE_VERSIONS" | grep -w $CURRENT_VERSION -A 1)
NUM=$(echo "$ME_AND_MY_NEXT" | wc -l)
if (( NUM > 1 )); then
NEXT_VERSION=$(echo "$ME_AND_MY_NEXT" | tail -n 1)
set -x
gh pr create --base "release/$NEXT_VERSION" --head "release/$CURRENT_VERSION" \
--title "Auto PR from release/$CURRENT_VERSION to release/$NEXT_VERSION" \
--body 'Created by Github action'
else
echo "No more higher release versions, will merge to main"
set -x
gh pr create --base main --head "release/$CURRENT_VERSION" \
--title "Auto PR from release/$CURRENT_VERSION to main" \
--body 'Created by Github action'
fi
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[PhotonlibOS.github.io](https://photonlibos.github.io)

## What's New
* Since 0.7, Photon will use release branches to enhance the reliability of software delivery. Bugfix will be merged into a stable release at first, then to higher release versions, and finally main.
* Since version 0.6, Photon can run with a userspace TCP/IP stack on top of `DPDK`.
[En](https://developer.aliyun.com/article/1208512) / [中文](https://developer.aliyun.com/article/1208390).
* How to transform `RocksDB` from multi-threads to coroutines by only 200 lines of code?
Expand Down

0 comments on commit 3ebddbb

Please sign in to comment.