Skip to content

Commit

Permalink
Pr action17 (#125) (#129)
Browse files Browse the repository at this point in the history
* Create main.yml
# Conflicts:
#	.github/workflows/main.yml
#	.pre-commit-config.yaml
  • Loading branch information
yuokamoto authored Nov 6, 2023
1 parent 36fc6b3 commit 8863454
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 4 deletions.
52 changes: 48 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,51 @@
on: workflow_dispatch
name: Create a pull request to other versions

on:
pull_request:
branches:
- devel
- UE5_devel_humble
types: ["closed"]

workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
echo_ref:
create_pr:
runs-on: ubuntu-latest
name: create_pr to other branchs
if: github.event.pull_request.merged == true
strategy:
matrix:
version:
- devel
- UE5_devel_humble
steps:
- run: |
echo $GITHUB_REF
- name: Checkout
uses: actions/checkout@v4
if: matrix.version != github.base_ref
with:
ref: ${{ matrix.version }}
- name: Debug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo ${{ matrix.version }}, ${{ github.base_ref }}, $GITHUB_SHA. ${{ github.event.pull_request.user.login }}
- name: Cherry pick and create PR
if: matrix.version != github.base_ref
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: carloscastrojumo/[email protected]
with:
branch: ${{ matrix.version }}
labels: |
cherry-pick
reviewers: |
${{ github.event.pull_request.user.login }}
token: ${{ secrets.GITHUB_TOKEN }}
cherry-pick-branch: auto_created_${{ matrix.version }}_${{ github.sha }}
title: '[cherry-pick to ${{ matrix.version }} from ${{ github.base_ref }}] ${{ github.event.pull_request.title }}'
body: 'Cherry picking ${{ github.event.pull_request.title }} onto this branch'
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
exclude: ^(ThirdParty/)|^(.github/)
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
Expand Down

0 comments on commit 8863454

Please sign in to comment.