Various Biome
functions
#38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Progress | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
update-progress: | |
if: github.repository == 'GRAnimated/MinecraftLCE' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: pip install capstone colorama cxxfilt pyelftools ansiwrap watchdog python-Levenshtein toml gitpython | |
- name: Generate progress CSV | |
run: python tools/common/progress.py -c > progress.csv | |
- name: Checkout progress repository | |
uses: actions/checkout@v3 | |
with: | |
repository: GRAnimated/MinecraftLCE-docs | |
token: ${{ secrets.PROGRESS_REPO_TOKEN }} | |
path: MinecraftLCE-docs | |
- name: Copy CSV to progress repository | |
run: cp progress.csv MinecraftLCE-docs/ | |
- name: Update repository description | |
run: | | |
IFS=',' read -r version timestamp git_hash num_total code_size_total matching_count matching_code_size equivalent_count equivalent_code_size non_matching_count non_matching_code_size < progress.csv | |
total_count=$((matching_count + equivalent_count + non_matching_count)) | |
progress_percentage=$(awk "BEGIN {printf \"%.3f\", ($total_count / $num_total) * 100}") | |
description="${progress_percentage}% - Decompilation of Minecraft: Legacy Console Edition" | |
gh repo edit GRAnimated/MinecraftLCE --description "$description" | |
env: | |
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
- name: Commit and push changes | |
run: | | |
cd MinecraftLCE-docs | |
git config --global user.name "Update progress workflow" | |
git config --global user.email "actions@github.com" | |
git add progress.csv | |
git commit -m "Update progress on commit ${{ github.sha }}" | |
git push origin main |