Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automate PR after changes to release branch #1189

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d78c985
automate PR after changes to release branch
ClaudiaComito Aug 2, 2023
3624622
Trigger workflow for testing
ClaudiaComito Aug 2, 2023
6e3130b
edits
ClaudiaComito Aug 2, 2023
a499720
Merge branch 'workflows/gh-action-merge-release-changes-into-main' of…
ClaudiaComito Aug 2, 2023
f99bba0
debugging
ClaudiaComito Aug 2, 2023
93fd52e
debugging
ClaudiaComito Aug 2, 2023
10c8cde
edits
ClaudiaComito Aug 2, 2023
feb7198
make sure starting branch is correct
ClaudiaComito Aug 2, 2023
bbc1271
make sure starting branch is correct
ClaudiaComito Aug 2, 2023
fc68531
debugging
ClaudiaComito Aug 2, 2023
2c94a56
debugging
ClaudiaComito Aug 2, 2023
421d100
debugging
ClaudiaComito Aug 2, 2023
9799fef
debugging
ClaudiaComito Aug 2, 2023
085a198
debugging
ClaudiaComito Aug 2, 2023
8e80764
debugging
ClaudiaComito Aug 2, 2023
428ca19
test difference between branches
ClaudiaComito Aug 2, 2023
7654424
test difference between branches
ClaudiaComito Aug 2, 2023
59ee4e9
test difference between branches
ClaudiaComito Aug 2, 2023
688ff74
debugging
ClaudiaComito Aug 2, 2023
eb8ef69
debugging
ClaudiaComito Aug 2, 2023
7976ca4
debugging
ClaudiaComito Aug 2, 2023
d4392d3
debugging
ClaudiaComito Aug 2, 2023
e42ef2c
pull version from main
ClaudiaComito Nov 22, 2023
2ffca37
pull dev version from main
ClaudiaComito Nov 22, 2023
89430d4
fix pointer to main branch
ClaudiaComito Nov 22, 2023
202ac9d
debug pointer to main branch
ClaudiaComito Nov 22, 2023
50f5213
debug pointer to main branch
ClaudiaComito Nov 22, 2023
205a4e2
debug pointer to main branch
ClaudiaComito Nov 22, 2023
4ca52da
more debugging pointer to main branch
ClaudiaComito Nov 22, 2023
669e242
remove token
ClaudiaComito Nov 22, 2023
972a329
separate checkout from commit job
ClaudiaComito Nov 22, 2023
87e485c
debug reference to main
ClaudiaComito Nov 22, 2023
e806ba5
identification
ClaudiaComito Nov 22, 2023
b5d69a2
debugging
ClaudiaComito Nov 22, 2023
9bebdd8
debugging
ClaudiaComito Nov 22, 2023
1b4a1fa
debugging
ClaudiaComito Nov 22, 2023
36eafb5
Update merge-release-changes-to-main.yml
mtar Nov 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/latest-pytorch-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
if [[ ${{ github.ref }} =~ .*main.* ]]; then
echo "base_branch=main" >> $GITHUB_ENV
elif [[ ${{ github.ref }} =~ .*release.* ]]; then
echo "base_branch=release/1.2.x" >> $GITHUB_ENV
echo "base_branch=release/1.3.x" >> $GITHUB_ENV
fi
- name: Create PR from branch
uses: peter-evans/create-pull-request@v4
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/merge-release-changes-to-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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
# set base branch 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:
ref: '${{ env.starting_branch }}'
- name: Create working branch
run: |
git fetch origin main:main
git checkout -b ${{ env.working_branch }}
git checkout main -- heat/core/version.py
git config --global user.name 'ClaudiaComito'
git config --global user.email '[email protected]@users.noreply.github.com'
git add heat/core/version.py
git commit -m "Update version.py from main branch"
- name: Commit and push working branch
run: |
git config --global user.name 'ClaudiaComito'
git config --global user.email '[email protected]@users.noreply.github.com'
git push -u 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 release 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 }}'
2 changes: 1 addition & 1 deletion .github/workflows/pytorch-latest-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
workflow_dispatch:
env:
working_branch: support/new-pytorch-release-branch
base_branch: release/1.2.x
base_branch: release/1.3.x
permissions:
contents: write
jobs:
Expand Down
Loading