Skip to content

Update logging system #40

Update logging system

Update logging system #40

Workflow file for this run

# run runall.py on commit and commit result to the repo
name: On Commit
on:
push:
branches:
- main
jobs:
fetch-commit-message:
runs-on: ubuntu-latest
outputs:
commit_message: ${{ steps.get_commit_message.outputs.message }}
steps:
- uses: actions/checkout@v2
- name: "Fetch commit message"
id: get_commit_message
run: echo "message=$(git log -1 --pretty=%B)" >> $GITHUB_OUTPUT
check-no-ci:
runs-on: ubuntu-latest
needs: fetch-commit-message
outputs:
no_ci: ${{ steps.check_no_ci.outputs.no_ci }}
steps:
- name: "Check for [no_ci] in commit message"
id: check_no_ci
run: |
if echo "${{ needs.fetch-commit-message.outputs.commit_message }}" | grep -iq '\[no_ci\]'; then
echo "no_ci=true" >> $GITHUB_OUTPUT
else
echo "no_ci=false" >> $GITHUB_OUTPUT
fi
run-main:
runs-on: ubuntu-latest
needs: check-no-ci
if: needs.check-no-ci.outputs.no_ci == 'false'
steps:
- uses: actions/checkout@v2
- name: "Set up Python"
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: "Run all"
run: python ./src/runall.py
commit-results:
runs-on: ubuntu-latest
needs:
- check-no-ci
- run-main
if: needs.check-no-ci.outputs.no_ci == 'false'
steps:
- uses: actions/checkout@v2
- name: "Commit results"
run: |
git config --global user.email ""
git config --global user.name "GitHub Actions"
git add .
git commit -m "Github Actions CI" || echo "Nothing to commit"
git push || echo "Nothing to push"