forked from trilinos/Trilinos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github action to sync fork with upstream
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Merge Trilinos/trilinos/develop into E3SM-Project/trilinos/develop | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # every day at midnight | ||
workflow_dispatch: # sync on button click | ||
|
||
jobs: | ||
merge-upstream-develop: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Show action trigger | ||
run: echo "The job was triggered by a ${{github.event_name}} event." | ||
- name: Get current date | ||
id: date | ||
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
with: | ||
show-progress: false | ||
ref: develop | ||
- name: Add upstream repo | ||
run: git remote add upstream https://github.com/trilinos/trilinos | ||
- name: Fetch upstream repo | ||
run: git fetch upstream | ||
- name: Create branch | ||
run: git checkout -b update-develop-${{ steps.date.outputs.DATE }} | ||
- name: debug | ||
run: git remote -v | ||
- name: debug2 | ||
run: pwd | ||
- name: debug2 | ||
run: git branch -a | grep develop | ||
- name: Merge upstream branch | ||
run: git merge --ff-only upstream/develop | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
branch: update-develop-${{ steps.date.outputs.DATE }} | ||
delete-branch: true | ||
base: develop | ||
title: Merge trilinos/develop into e3sm-project/develop | ||
body: Created by Github action | ||
- name: Merge Pull Request | ||
uses: peter-evans/enable-pull-request-automerge | ||
with: | ||
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }} |