Skip to content

Commit

Permalink
Merge pull request #84 from gradedSystem/main
Browse files Browse the repository at this point in the history
[fix][s] Fixing the gh actions
  • Loading branch information
anuveyatsu authored Oct 1, 2024
2 parents 16dd7f0 + 790eb59 commit 6ccd7f3
Show file tree
Hide file tree
Showing 6 changed files with 306 additions and 258 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Run Makefile with Selenium

on:
# Schedule to run every 1st day of a month at 00 UTC
# Schedule to run on the 1st day of each month
schedule:
- cron: '0 0 1 * *'

Expand Down Expand Up @@ -48,7 +48,20 @@ jobs:
run: |
Xvfb :99 -screen 0 1024x768x24 &
export DISPLAY=:99
make update
source venv/bin/activate
make update
- name: Run Make Clean
run: make clean
run: |
source venv/bin/activate
make clean
- name: Push and Commit
env:
CI_COMMIT_NAME: "Automated commit"
CI_COMMIT_EMAIL: "actions@users.noreply.github.com"
CI_COMMIT_MESSAGE: "Automated commit"
run: |
git config --global user.email "${{env.CI_COMMIT_EMAIL}}"
git config --global user.name "${{env.CI_COMMIT_NAME}}"
git diff --quiet && echo "No changes to commit" || (git add data/country-codes.csv && git commit -m "${{env.CI_COMMIT_MESSAGE}}" && git push)
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,13 @@ data/country-codes.csv: data/country-codes.json data/geoname.csv data/cldr.csv d
python3 scripts/reorder_columns.py
python3 scripts/reorder_rows.py
cp data/country-codes-reordered-sorted.csv data/country-codes.csv
python3 scripts/cleanup.py # Ensure final column order
./scripts/wd_countries.sh
python3 scripts/wd_countries.py
python3 scripts/cleanup.py
cp data/country-codes.csv data/previous-country-codes.csv

clean:
# Delete all .csv files starting with 'country' except 'country-codes.csv'
# Delete all .csv files except 'country-codes.csv'
find data/ -name "*.csv" ! -name "country-codes.csv" -exec rm {} +

# Delete all .json files
Expand Down
Loading

0 comments on commit 6ccd7f3

Please sign in to comment.