-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github action: automatically merge with js_of_ocaml
- Loading branch information
Showing
1 changed file
with
39 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,39 @@ | ||
name: Automatic Merge with Js_of_ocaml | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # Executes daily at midnight UTC | ||
workflow_dispatch: # Allows manual triggering of the workflow | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
merge: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout this repository | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: main | ||
fetch-depth: 1000 | ||
|
||
- name: Set Git committer identity | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
- name: Fetch js_of_ocaml master | ||
run: git fetch https://github.com/ocsigen/js_of_ocaml.git master | ||
|
||
- name: Merge js_of_ocaml master into current repository | ||
run: git merge FETCH_HEAD | ||
|
||
- name: Push merged changes to 'jsoo-merged' branch | ||
run: | | ||
if git show-ref --verify --quiet refs/heads/jsoo-merged; then | ||
git branch -D jsoo-merged | ||
fi | ||
git checkout -b jsoo-merged | ||
git push --force origin jsoo-merged |