Update okxlin App List #131
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 okxlin App List | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * *' # Runs daily at midnight | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
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 pyyaml | |
- name: Run the script | |
run: | | |
cd Script | |
python update_okxlin_apps_list.py | |
- name: Check for changes | |
id: changes | |
run: | | |
git diff --exit-code src/thirdStores/okxlin/app_list.md || echo "has_changes=true" >> $GITHUB_ENV | |
- name: Commit changes | |
if: env.has_changes == 'true' | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git add src/thirdStores/okxlin/app_list.md | |
git commit -m 'Update okxlin_app_list.md' | |
- name: Push changes | |
if: env.has_changes == 'true' | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
branch: main |