From 3435a6701a5dfa748ecb77f1da6c7eede6bb4636 Mon Sep 17 00:00:00 2001 From: Sebastian Stenzel Date: Thu, 5 May 2022 07:41:36 +0200 Subject: [PATCH] round timestamp to latest 15min mark --- .github/workflows/dl-stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dl-stats.yml b/.github/workflows/dl-stats.yml index 4d9035be4..084e3ac41 100644 --- a/.github/workflows/dl-stats.yml +++ b/.github/workflows/dl-stats.yml @@ -37,7 +37,7 @@ jobs: - name: Transform Results id: transform-stats run: | - TIME=$(date +%s) + TIME=$(($(date +%s) / 900 * 900)) echo ${JSON_DATA} | jq --arg TIME "$TIME" -c '.repository.releases.nodes[] | select(.isPrerelease == false) | .tagName as $tagName | .releaseAssets.nodes[] | {filename: .name, downloads: .downloadCount, release: $tagName, time: ($TIME|tonumber)}' > input.json jq -c 'select(.filename|endswith("-x86_64.AppImage")) | {name: "github.releases.downloads", tags: ["file=AppImage", "version=\(.release)", "arch=amd64"], value: .downloads, interval: 900, time: .time}' input.json >> output.json