Hello, this is an amazing title, Fixes AB#1234 #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
#saw | |
name: "Deploy on Comment" | |
on: | |
issue_comment: | |
types: [created] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.event.issue.pull_request && contains(github.event.comment.body, 'lcc-200') | |
steps: | |
- name: Get PR branch | |
uses: xt0rted/pull-request-comment-branch@v1 | |
id: comment-branch | |
- name: Set env var | |
run: | | |
result=$(echo "${{ github.event.comment.body }}" | grep -oP '(?<=#)\d+') | |
echo "TEST=${result}" >> $GITHUB_ENV | |
- name: Echo extracted title | |
run: | | |
echo "$TEST" | |
- name: Checkout PR branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ steps.comment-branch.outputs.head_ref }} | |
fetch-depth: 0 | |
- name: Commit report | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit --allow-empty -m "Fixed AB#$TEST" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
branch: ${{ steps.comment-branch.outputs.head_ref }} |