Update Data #23987
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 Data | |
on: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 * * * *' # Hourly | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt update && sudo apt install ruby-nokogiri git | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build | |
run: | | |
ruby ./generate-flatpak.rb | |
- name: Commit | |
run: | | |
FILES_CHANGED=$(git diff --name-only | wc -l) | |
if [[ $FILES_CHANGED != 0 ]]; then | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add -A | |
git commit -m "Automatic update of data" -a | |
git push | |
fi |