forked from MonsterDruide1/OdysseyDecomp
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.28 KB
/
progress.yml
File metadata and controls
40 lines (39 loc) · 1.28 KB
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
name: progress
on:
push:
branches:
- master
permissions: {}
jobs:
publish_progress:
if: github.repository == 'MonsterDruide1/OdysseyDecomp'
runs-on: ubuntu-24.04
steps:
- name: Check out project
uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up python
uses: actions/setup-python@v6
with:
python-version: '3.14'
cache: 'pip'
- name: Set up python package dependencies
run: pip install toml colorama cxxfilt
- name: Upload progress state
run: |
full_ansi="$(tools/file_list_progress.py)"
full=`echo $full_ansi | sed -e 's/\x1b\[[0-9;]*m//g'`
echo $full
MATCHING=`echo $full | sed -n "s/^.*matching\s(\([0-9]\+\.[0-9]\+\)%.*$/\1/p"`
MINOR=`echo $full | sed -n "s/^.*non-matching (minor issues)\s(\([0-9]\+\.[0-9]\+\)%.*$/\1/p"`
MAJOR=`echo $full | sed -n "s/^.*non-matching (major issues)\s(\([0-9]\+\.[0-9]\+\)%.*$/\1/p"`
var=`curl "https://monsterdruide.one/OdysseyDecomp/save_progress.php?matching=$MATCHING&minor=$MINOR&major=$MAJOR&pw=$PROGRESS_PASS"`
if [[ "$var" == "OK" ]]; then
exit 0
else
echo $var;
exit 1
fi
env:
PROGRESS_PASS: ${{ secrets.PROGRESS_PASS }}