-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (52 loc) · 2.09 KB
/
pull-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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
name: Pull Upstream
on:
workflow_dispatch:
permissions:
contents: write
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: "nyanrus_release"
fetch-depth: 0
- name: clone upstream
run: |
git clone -b release --single-branch https://github.com/mozilla/gecko-dev --depth 1 upstream_release
rm -rf ./upstream_release/.git ./upstream_release/.github
mv ./upstream_release/README.txt ./upstream_release/MOZ_README.txt
- name: copy upstream to this_repo
run: |
rsync -aq --progress upstream_release/ temp_release
cp -r ./nyanrus_release/.git temp_release
cp -r ./nyanrus_release/.github temp_release
cp ./nyanrus_release/.gitmodules temp_release
cp -r ./nyanrus_release/noraneko temp_release
cp ./nyanrus_release/README.md temp_release
- id: apply-git-patches
name: apply git patches
continue-on-error: true
run: |
cd temp_release
git apply --ignore-space-change --reject --ignore-whitespace .github/patches/upstream/*.patch
cp -f .github/assets/installer/setup.ico other-licenses/7zstub/firefox/setup.ico
cp -f .github/assets/installer/7zSD.ARM64.sfx other-licenses/7zstub/firefox/7zSD.ARM64.sfx
cp -f .github/assets/installer/7zSD.Win32.sfx other-licenses/7zstub/firefox/7zSD.Win32.sfx
- name: detect patch error
if: ${{ steps.apply-git-patches.outcome == 'failure' }}
run: |
echo "Patch Error!"
exit 1
- name: push
run: |
cd temp_release
export FF_VERSION=$(cat browser/config/version.txt)
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "sync upstream gecko-dev $FF_VERSION"
git push