forked from coolsnowwolf/lede
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.11 KB
/
Sync-with-upstream.yml
File metadata and controls
40 lines (39 loc) · 1.11 KB
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
34
35
36
37
38
39
40
#
# This is free software, lisence use MIT.
#
# Copyright (C) 2019 KFERMercer <KFER.Mercer@gmail.com>
#
# <https://github.com/KFERMercer/OpenWrt-CI>
#
name: Sync with upstream
on:
schedule:
- cron: 0 0 1 * *
workflow_dispatch:
permissions:
actions: write
contents: write
env:
UPSTREAM_REPO: https://github.com/coolsnowwolf/lede.git
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout origin
uses: actions/checkout@v2
with:
fetch-depth: 0
lfs: true
token: '${{ secrets.GITHUB_TOKEN }}'
#token: '${{ secrets.WORKFLOW_TOKEN }}'
- name: Set git identity
run : |
#git config --global user.email ${{ secrets.EMAIL }} && git config --global user.name github-actions
git config user.name github-actions
git config user.email github-actions@github.com
#git config --local user.email "action@github.com"
#git config --local user.name "GitHub Action"
- name: Pull upstream
run: git pull $UPSTREAM_REPO --no-edit --rebase --strategy-option=ours
- name: Push commits
run: git push origin --force