Skip to content

[Balance] Pre-Pulsar APL support PTR #14

[Balance] Pre-Pulsar APL support PTR

[Balance] Pre-Pulsar APL support PTR #14

name: Update APL PTR
on:
push:
paths:
- 'balance_ptr.txt'
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- uses: actions/checkout@v3
- name: checkout simc
uses: actions/checkout@v3
with:
repository: simulationcraft/simc
token: ${{ secrets.API_TOKEN_GITHUB }}
path: './simc'
- name: generate APL
run: python generate_apl.py -f balance_ptr.txt -o balance_apl_ptr.inc "./simc"
- name: commit APL
run: |
git log -1 --pretty=format:"%B%nbalance-simc/Balance-SimC@%h" > commit_msg
echo >> commit_msg
echo >> commit_msg
echo "Co-authored-by: Balance-SimC <[email protected]>" >> commit_msg
git config --global user.name $(git log -1 --format=%aN)
git config --global user.email $(git log -1 --format=%aE)
cd simc
if [ -z "$(git status --porcelain)" ]; then
echo "no changes to apl"
else
git add .
git commit -F ../commit_msg
git push
fi