forked from iglunix/iglunix
-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (58 loc) · 1.84 KB
/
ood.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
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 6'
jobs:
ood:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Out of date
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/mirror.key
sudo chmod 600 ~/.ssh/mirror.key
echo "$SSH_KNOWN_HOST" > ~/.ssh/known_hosts
set -x
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
sudo apt install libarchive-tools
sudo rm -f /usr/bin/tar
sudo ln -s bsdtar /usr/bin/tar
tar --version
./scripts/ood.sh
if [ ! -f ood.list ]
then
exit 0
fi
cat ood.list
# ./scripts/fetch_autobuild.sh
for pkg in $(cat ood.list)
do
./scripts/updatever.sh $(dirname $pkg) $(basename $pkg)
./scripts/setup_sysroot.sh $pkg
if ./scripts/check_builds.sh $pkg
then
git add $pkg/build.sh
git commit -m "bump $pkg"
fi
done
# we need to reset the changes that didn't stick
# so we can create an issue about still out of date packages
git reset --hard
./scripts/ood.sh | tee -a issue.md
if [ ! -z "$(cat issue.md)" ]
then
if gh issue list | grep "Out of date packages"
then
NUM=$(gh issue list | grep "Out of date packages" | cut -f1)
gh issue edit $NUM --body-file issue.md
else
gh issue create -t "Out of date packages" -Fissue.md
fi
fi
git push -u origin main
env:
SSH_PRIVATE_KEY: ${{secrets.SSH_PRIVATE_KEY}}
SSH_KNOWN_HOST: ${{secrets.SSH_KNOWN_HOST}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}