Add workflow to automatically create fix2024 PRs SO107 #1
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
name: fix2024-auto-pr | |
on: | |
# Run on merging a PR into trunk | |
pull_request: | |
types: | |
- synchronize # for testing | |
branches: | |
- trunk | |
jobs: | |
create-pr: | |
# Only run if the PR was merged and contained the auto-pr-fix2024 label | |
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'auto-pr-fix2024') | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Test | |
run: | | |
echo "Should run..." | |
# Configure git | |
- name: Setup Git config | |
run: | | |
git config user.name "bot-scm" | |
git config user.email "[email protected]" | |
# Create a new branch from fix2024 | |
- name: Create a new branch | |
run: | | |
git checkout fix2024 | |
git checkout -b "Bot-SCM/auto-pr-fix2024-${{ github.event.pull_request.number }}" | |
# |