-
Notifications
You must be signed in to change notification settings - Fork 7
65 lines (62 loc) · 2.57 KB
/
desktop-genprovides.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
54
55
56
57
58
59
60
61
62
63
64
65
name: Marvin Provides generation for desktop
on:
schedule:
- cron: '0 20 * * *'
jobs:
syncprovides:
runs-on: ubuntu-latest
env:
GIT_AUTHOR_NAME: MarvinHatesOceans
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: MarvinHatesOceans
GIT_COMMITTER_EMAIL: [email protected]
WORK_BRANCH: genprovides
AUTO_GIT: true
LUET_NOLOCK: true
LUET_YES: true
TOKEN: ${{ secrets.MARVIN_GITHUB_TOKEN }}
GITHUB_PRIVATE_KEY: "${{ secrets.MARVIN_GITHUB_PRIVATE_KEY }}"
GITHUB_PUBLIC_KEY: "${{ secrets.MARVIN_GITHUB_PUBLIC_KEY }}"
HUB_CREDENTIALS: "${{ secrets.MARVIN_HUB_CREDENTIALS }}"
strategy:
matrix:
include:
- upstream_branch: "master"
fork: "[email protected]:auto-maintainers/desktop.git"
upstream_repo: "https://github.com/mocaccinoOS/desktop"
name: "Mocaccino Desktop"
steps:
- env:
HUB_ARGS: "-b ${{ matrix.upstream_branch }}"
FORK_REPO: ${{ matrix.fork }}
UPSTREAM_REPO: ${{ matrix.upstream_repo }}
RESET_BRANCH: ${{ matrix.upstream_branch }}
name: Autobump ${{matrix.name}}
run: |
curl https://get.mocaccino.org/luet/get_luet_root.sh | sudo sh
sudo luet install -y repository/mocaccino-extra
sudo luet install -y dev-util/pkgs-checker-minimal system/luet-extensions system/luet-devkit utils/jq utils/yq vcs/hub
mkdir -p $HOME/.ssh
mkdir -p $HOME/.config
echo "$GITHUB_PRIVATE_KEY" > $HOME/.ssh/id_rsa
echo "$GITHUB_PUBLIC_KEY" > $HOME/.ssh/id_rsa.pub
echo "$HUB_CREDENTIALS" > $HOME/.config/hub
chmod 700 ~/.ssh
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa.pub
git clone $FORK_REPO fork
cd fork
git remote add upstream $UPSTREAM_REPO
git fetch --all
git reset --hard upstream/${RESET_BRANCH}
git push -fv
echo "Removing working branch if present"
git branch -D $WORK_BRANCH || true
git checkout -b $WORK_BRANCH
git reset --hard upstream/${RESET_BRANCH}
git push -fv -u origin $WORK_BRANCH
./scripts/generate_all_provides.sh
git add packages
git commit -m "Update layer provides"
git push -f -v origin $WORK_BRANCH
hub pull-request $HUB_ARGS -m "$(git log -1 --pretty=%B)"