Update list #294
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 list | |
on: | |
push: { main } | |
workflow_dispatch: | |
jobs: | |
update: | |
name: Update list | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout git repository | |
uses: actions/checkout@v4 | |
- name: Install dart | |
uses: dart-lang/setup-dart@v1 | |
- name: Install dart dependencies | |
working-directory: updater | |
run: dart pub get | |
- name: Run dart project | |
run: dart updater/lib/update_list.dart | |
- name: Check difference | |
run: | | |
status=$(git status -s .) && \ | |
echo $status && \ | |
echo "GIT_STATUS=${status//$'\n'/\\n}" >> $GITHUB_ENV | |
- name: Push changes | |
if: "contains(env.GIT_STATUS, 'README.md')" | |
run: | | |
git config --global user.email "action@github.com" && \ | |
git config --global user.name "Github CI" && \ | |
git commit -a -m "update list" && \ | |
git push |