Enum Update #113
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: "Enum Update" | |
on: | |
schedule: | |
- cron: '0 10 * * 6' # everyday at 10am | |
push: | |
branches: [master, ] | |
jobs: | |
enum-update: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Install and Setup | |
run: | | |
set -x | |
python -m pip install -U pip setuptools wheel | |
python -m pip install -U beautifulsoup4[html5lib] requests html2text isort | |
python -m pip install -e . | |
- name: Update Vendor | |
run: | | |
set -x | |
zlogging-gen | |
isort -l100 -pzlogging zlogging/enum/*.py | |
- name: Verify Changed files | |
uses: tj-actions/verify-changed-files@v17 | |
id: verify-changed-files | |
- name: Bump Version | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
run: | | |
set -x | |
python util/enum_docs.py | |
python util/bump_version.py | |
isort -l100 -pzlogging zlogging | |
- name: Commit changes | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git commit -am"Bumped version to $(python -c 'import zlogging; print(zlogging.__version__)') | |
Updated constant enumerations at $(date). The following files | |
have been changed: ${{ steps.verify-changed-files.outputs.changed_files }}" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
if: steps.verify-changed-files.outputs.files_changed == 'true' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} |