Skip to content

Commit

Permalink
craeted push stable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cophilot committed Mar 15, 2024
1 parent c661856 commit 547c24b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create New Stable Version
name: Create New Stable Version (Manual)

on:
workflow_dispatch:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/new_stable_version_push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Create New Stable Version (Push)

on:
push:
branches:
- main

jobs:
create_pull_request:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Check commit message for [stable]
id: check_commit_message
run: echo ::set-output name=contains_stable::$(if grep -q "\[stable\]" <<< "$(git log --format=%B -n 1)"; then echo true; else echo false; fi)

- name: Create Pull Request
if: steps.check_commit_message.outputs.contains_stable == 'true'
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: stable
base: main
title: Automated New Stable Version
body: This pull request was automatically created by the workflow and contains the latest stable version of the repository.

0 comments on commit 547c24b

Please sign in to comment.