From b83c4d65e5e6a7e7993dcece11499e548f58f86b Mon Sep 17 00:00:00 2001 From: Livio Date: Sun, 2 Feb 2020 22:03:41 +0100 Subject: [PATCH] Add ability to pass output to another step Fixes #16 --- .github/workflows/test.yml | 3 +++ entrypoint.sh | 1 + 2 files changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8c972aa..3087433 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,6 +12,9 @@ jobs: uses: ./ with: url: 'https://github.com/' + id: lighthouse + - name: Check output + run: echo "${{ steps.lighthouse.outputs.performance }}"" - uses: actions/upload-artifact@master with: name: report diff --git a/entrypoint.sh b/entrypoint.sh index 38fa935..b027240 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -47,5 +47,6 @@ printf "+-------------------------------+\n\n" printf "* Detailed results are saved here, use https://github.com/actions/upload-artifact to retrieve them:\n" printf " %s\n" "$OUTPUT_PATH.report.html" printf " %s\n" "$OUTPUT_PATH.report.json" +echo "##[set-output name=performance;]$(echo "$SCORE_PERFORMANCE*100" | bc -l)" exit 0