From 77d8f122ac0b70ea234bf2d5b9edc2269d917b2d Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 21 Mar 2023 14:53:16 +0100 Subject: [PATCH] Update and rename weekly_stats_graphs.yaml to helper_stats_graphs.yaml --- ...s_graphs.yaml => helper_stats_graphs.yaml} | 69 ++++++++++--------- 1 file changed, 36 insertions(+), 33 deletions(-) rename .github/workflows/{weekly_stats_graphs.yaml => helper_stats_graphs.yaml} (79%) diff --git a/.github/workflows/weekly_stats_graphs.yaml b/.github/workflows/helper_stats_graphs.yaml similarity index 79% rename from .github/workflows/weekly_stats_graphs.yaml rename to .github/workflows/helper_stats_graphs.yaml index 3e9e85627..e1304aa19 100644 --- a/.github/workflows/weekly_stats_graphs.yaml +++ b/.github/workflows/helper_stats_graphs.yaml @@ -2,8 +2,10 @@ --- name: Generate weekly stats graphs on: - schedule: - - cron: "0 13 * * 5" + workflow_run: + workflows: ["weekly_stats.yaml"] + types: + - completed workflow_dispatch: jobs: @@ -172,38 +174,39 @@ jobs: FOLDER="$(grep -rl "ghcr.io/alexbelgium/$TITLE-" . | xargs dirname)" || echo "$TITLE not found" # if folder exists if [ -d "$FOLDER" ]; then - echo "$TITLE" - # Plot graph - ( gnuplot-nox -persist <<-EOFMarker - set title "$TITLE" - set ylabel 'Number of installations' - set xdata time - set datafile missing "-" - set timefmt "%Y-%m-%d" - set format x "%y-%m-%d" - set datafile sep ' ' - set autoscale - set terminal png size 500,300 - set output "$FOLDER/stats.png" - set term png tiny - plot for [i=2:*] 'Stats3' using 1:i w l title columnhead(i) smooth csplines - EOFMarker - ) || ( gnuplot-nox -persist <<-EOFMarker - set title "$TITLE" - set ylabel 'Number of installations' - set xdata time - set datafile missing "-" - set timefmt "%Y-%m-%d" - set format x "%y-%m-%d" - set datafile sep ' ' - set autoscale - set terminal png size 500,300 - set output "$FOLDER/stats.png" - set term png tiny - plot for [i=2:*] 'Stats3' using 1:i w l title columnhead(i) - EOFMarker - ) + echo "$TITLE" + # Plot graph + ( gnuplot-nox -persist <<-EOFMarker + set title "$TITLE" + set ylabel 'Number of installations' + set xdata time + set datafile missing "-" + set timefmt "%Y-%m-%d" + set format x "%y-%m-%d" + set datafile sep ' ' + set autoscale + set terminal png size 500,300 + set output "$FOLDER/stats.png" + set term png tiny + plot for [i=2:*] 'Stats3' using 1:i w l title columnhead(i) smooth csplines + EOFMarker + ) || ( gnuplot-nox -persist <<-EOFMarker + set title "$TITLE" + set ylabel 'Number of installations' + set xdata time + set datafile missing "-" + set timefmt "%Y-%m-%d" + set format x "%y-%m-%d" + set datafile sep ' ' + set autoscale + set terminal png size 500,300 + set output "$FOLDER/stats.png" + set term png tiny + plot for [i=2:*] 'Stats3' using 1:i w l title columnhead(i) + EOFMarker + ) fi + done # Clean files rm Stats3