Skip to content

Auto update compat branch #24

Auto update compat branch

Auto update compat branch #24

Workflow file for this run

name: Auto update compat branch
on:
push:
branches:
- master
paths: ['src/phub/**']
workflow_dispatch:
jobs:
translate:
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Checkout master branch
uses: actions/checkout@v2
with:
ref: master
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest autopep8
- name: Run translation script
run: |
python .github/workflows/translate.py ./src/**/*.py
# - name: Run pytest
# run: python -m pytest
- name: Update Pyproject version
run: sed -i 's/requires-python = ">=3.11"/requires-python = ">=3.8"/' pyproject.toml
- name: Remove .pyc files and workflow files
run: |
find . -type f \( -name "*.pyc" -o -path "./.github/workflows/*" -o -path "./docs/*" \) -delete
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git checkout -b compat
git add .
git commit -m "Automatic translation"
git push -f origin compat