diff --git a/.github/workflows/validate_json.yml b/.github/workflows/validate_json.yml index 617cd92..814b5f6 100644 --- a/.github/workflows/validate_json.yml +++ b/.github/workflows/validate_json.yml @@ -13,6 +13,26 @@ jobs: steps: - uses: actions/checkout@v3 with: - path: './' - - run: | - cat sellers.json | jq -e \ No newline at end of file + ref: ${{ github.head_ref }} + path: ads + + - name: Validate JSON + id: json-validate + working-directory: ads + run: | + cat sellers.json | jq -e + + - name: Update JSON Timestamp + id: json-timestamp + working-directory: ads + run: | + cat sellers.json | jq '.ext.last_updated = (now | todate)' | tee sellers.json + + - name: Push Changes to PR + working-directory: ads + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }} + git commit -am "Update sellers.json timestamp" + git push \ No newline at end of file diff --git a/sellers.json b/sellers.json index 51d7490..69dc47d 100644 --- a/sellers.json +++ b/sellers.json @@ -2,7 +2,7 @@ "contact_address": "401 Broadway, Suite 1100, New York, NY, 10013", "contact_email": "advertising@nimbus.co", "ext": { - "last_updated": "02-20-2024" + "last_updated": "2024-02-20T16:35:25Z" }, "identifiers": [ { @@ -216,5 +216,5 @@ "seller_type": "PUBLISHER" } ], - "version": 1.0 -} \ No newline at end of file + "version": 1 +}