diff --git a/action.yml b/action.yml index 8efa9a5..c2cf28e 100644 --- a/action.yml +++ b/action.yml @@ -130,7 +130,7 @@ runs: fi # Create Size Report - "$GITHUB_ACTION_PATH/scripts/create-report.sh" report.json + "$GITHUB_ACTION_PATH/scripts/create-report.sh" > report.json # Nothing else to do if [ "$COMMENT" != 'true' ]; then exit 0; fi diff --git a/scripts/create-report.sh b/scripts/create-report.sh index cfe4209..26fd732 100755 --- a/scripts/create-report.sh +++ b/scripts/create-report.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env bash set -eu @@ -78,4 +78,4 @@ echo "{}" | jq \ --argjson pkgs "$pkgs" \ --argjson hmConfigs "$hmConfigs" \ --argjson nixosConfigs "$nixosConfigs" \ - '{"packages": $pkgs, "nixosConfigurations": $nixosConfigs, "homeConfigurations": $hmConfigs}' >"${1:-/dev/stdout}" + '{"packages": $pkgs, "nixosConfigurations": $nixosConfigs, "homeConfigurations": $hmConfigs}' diff --git a/scripts/retrieve-old-report.sh b/scripts/retrieve-old-report.sh index 9c50afe..d1ab0f2 100755 --- a/scripts/retrieve-old-report.sh +++ b/scripts/retrieve-old-report.sh @@ -74,6 +74,6 @@ curl -X 'GET' \ tar -zvx --strip-components=1 -C "$old" endgroup -(cd "$old" && "$GITHUB_ACTION_PATH/create-report.sh" old-report.json) +(cd "$old" && "$GITHUB_ACTION_PATH/create-report.sh") >old-report.json exit 0