pull dev version from main #22
Workflow file for this run
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
on: | |
push: | |
branches: | |
- 'workflows/gh-action-merge-release-changes-into-main' | |
# replace with release/1.3.x after testing | |
env: | |
starting_branch: ${{ github.ref }} | |
working_branch: workflows/merge-release-changes-to-main | |
base_branch: main | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
jobs: | |
check_out: | |
runs-on: ubuntu-latest | |
if: ${{ github.repository }} == 'hemlholtz-analytics/heat' | |
steps: | |
# make sure that new branch is created from starting_branch | |
- name: Delete working branch if it already exists | |
run: git push --delete origin ${{ env.working_branch }} || true | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
ref: '${{ env.starting_branch }}' | |
- name: Create working branch | |
run: | | |
git checkout -b ${{ env.working_branch }} ${{ env.starting_branch }} | |
git pull ${{ env.base_branch }} heat/core/version.py | |
git push --set-upstream origin ${{ env.working_branch }} | |
- name: Create a pull request | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
delete-branch: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
commit-message: 'Merge branch changes to main' | |
title: 'Merge ${{ env.starting_branch }} changes to ${{ env.base_branch }}' | |
body: 'This PR merges changes from release branch to main branch' | |
branch: '${{ env.working_branch }}' | |
base: '${{ env.base_branch }}' |