Skip to content

test action

test action #9

name: Update Token List on PR Merge
on:
pull_request:
types: [opened]
jobs:
update-token-list:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Update token-list.json
run: python .github/scripts/update-token-list.py
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add chains/**/token-list.json
if git diff-index --quiet HEAD; then
echo "No changes to commit"
else
git commit -m 'Update token-list.json files'
git push origin HEAD:${{ github.ref }}
fi