-
Notifications
You must be signed in to change notification settings - Fork 6
33 lines (31 loc) · 1.01 KB
/
upstream.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: "Merge Upstream"
on:
schedule:
- cron: "30 20 * * *"
workflow_dispatch:
jobs:
pull:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: |
git config --global user.name 'Upstream Merge Action'
git config --global user.email '[email protected]'
git remote add -f upstream "https://cheapiesystems.com/git/digistuff"
git fetch upstream
git checkout -B upstream
git reset --hard upstream/master
git push origin upstream --force
(printf "GITLOG<<EOF\n";git log origin/master..upstream/master;printf "\nEOF")|sed 's/"/\"/g'>>$GITHUB_ENV
shell: bash
- name: Create Pull Request
uses: repo-sync/pull-request@v2
with:
source_branch: upstream
destination_branch: master
pr_title: "Pulling upstream into master"
pr_body: "${{ env.GITLOG }}"
pr_label: "upstream"
github_token: ${{ secrets.GITHUB_TOKEN }}