Skip to content

Commit

Permalink
chore(ci): date to string failed with option f on linux (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
m-maillot authored Aug 16, 2022
1 parent 734ddcc commit 9f039e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check-data-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Test SDR urls
- name: Check agreements by enterprise has been updated
run: |
last=$(curl 'https://www.data.gouv.fr/api/1/datasets/liste-des-conventions-collectives-par-entreprise-siret/' | jq -r '.resources[0].last_modified' | sed 's/\..*//')
current=$(date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s")
last_update=$(date -j -f "%Y-%m-%dT%H:%M:%S" "$last" "+%s")
last_update=$(date -d '$last' +"%s")
days_diff=$(( ($current - $last_update) / (24*3600) ))
echo "Data has not been updated since $days_diff days"
if [ $days_diff -gt 31 ]
Expand Down

0 comments on commit 9f039e3

Please sign in to comment.