From d18f71c12cd2a10023fb5fb7d03d8bbca967b225 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 24 Apr 2022 18:34:10 +0000 Subject: [PATCH] ci: auto-regenerate files --- README.md | 1 + action.yml | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 854a3425..4f68438c 100644 --- a/README.md +++ b/README.md @@ -393,6 +393,7 @@ There are several ways to setup metrics, each having its advantages and disadvan Additional resources for setup: * [🏦 Configure metrics for organizations](/.github/readme/partials/documentation/organizations.md) +* [🏠 Run metrics on self-hosted runners](/.github/readme/partials/documentation/selfhosted.md) * [🧰 Template/Plugin compatibility matrix](/.github/readme/partials/documentation/compatibility.md) ## 🖼️ Templates diff --git a/action.yml b/action.yml index c00d4d05..6c24358b 100644 --- a/action.yml +++ b/action.yml @@ -1170,10 +1170,24 @@ runs: using: composite steps: - run: | - # Create environment file from inputs and GitHub variables + # Check runner compatibility echo "::group::Metrics docker image setup" echo "GitHub action: $METRICS_ACTION ($METRICS_ACTION_PATH)" cd $METRICS_ACTION_PATH + for DEPENDENCY in docker jq; do + if ! which $DEPENDENCY; then + echo '::error::"$DEPENDENCY" is not installed on current runner but is needed to run metrics' + MISSING_DEPENDENCIES=1 + fi + done + if [[ $MISSING_DEPENDENCIES == "1" ]]; then + echo "Runner compatibility: missing dependencies" + exit 1 + else + echo "Runner compatibility: compatible" + fi + + # Create environment file from inputs and GitHub variables touch .env for INPUT in $(echo $INPUTS | jq -r 'to_entries|map("INPUT_\(.key|ascii_upcase)=\(.value|@uri)")|.[]'); do echo $INPUT >> .env