-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (33 loc) · 1.1 KB
/
sync_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
34
35
36
name: sync upstream
on:
schedule:
- cron: '15 */1 * * *'
jobs:
fetch:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: setup config
run: |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
git remote set-url origin https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git
git remote add upstream https://git.pleroma.social/pleroma/pleroma.git
git remote add fork https://kphrx:${{ secrets.PLEROMA_GITLAB_TOKEN }}@git.pleroma.social/kphrx/pleroma.git
- name: fetch upstream
run: |
git fetch upstream stable:stable
git fetch upstream develop:develop
git fetch upstream --tags
- name: push to origin
run: |
git push origin stable:stable
git push origin develop:develop
git push origin --tags
- name: push to fork
run: |
git push fork stable:stable
git push fork develop:develop
git push fork --tags