-
-
Notifications
You must be signed in to change notification settings - Fork 25
52 lines (48 loc) · 1.57 KB
/
update-branch.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
name: Update per branch
on:
schedule:
- cron: "*/30 * * * *"
workflow_dispatch:
jobs:
autoupdate:
runs-on: ubuntu-latest
strategy:
matrix:
branch:
- frawhide
- f39
- f40
- f41
- el9
container:
image: ghcr.io/terrapkg/builder:frawhide
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
fetch-depth: 0
ssh-key: ${{ secrets.SSH_AUTHENTICATION_KEY }}
- name: Install SSH signing key & Set up git repository
run: |
mkdir -p ${{ runner.temp }}
echo "${{ secrets.SSH_SIGNING_KEY }}" > ${{ runner.temp }}/signing_key
chmod 0700 ${{ runner.temp }}/signing_key
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Run Update
run: anda update -vv --filters updbranch=1 --labels branch=${{ matrix.branch }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUST_BACKTRACE: full
- name: Save
run: |
if [[ `git status --porcelain` ]]; then
git config user.name "Raboneko"
git config user.email "[email protected]"
git config gpg.format "ssh"
git config user.signingkey "${{ runner.temp }}/signing_key"
msg="bump(branch): $(git status | grep modified | sed -r 's@.+/([^/]+)/[^/]+\n?@\1 @g' | tr -d '\n')"
git commit -S -a -m "$msg"
git push -u origin --all
fi