From 0c67c6e270c37a0c3d9386a5c71b95ad1533f791 Mon Sep 17 00:00:00 2001 From: Yoann Chaudet Date: Wed, 5 Jan 2022 14:58:09 -0800 Subject: [PATCH] Initialize JEKYLL_BUILD_REVISION with GITHUB_SHA --- action.yml.erb | 4 ++++ entrypoint.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/action.yml.erb b/action.yml.erb index 916be04..226285b 100644 --- a/action.yml.erb +++ b/action.yml.erb @@ -15,6 +15,10 @@ inputs: description: 'Publishes posts with a future date.' required: false default: true + build_revision: + description: 'The SHA-1 of the git commit for which the build is running. Default to GITHUB_SHA when not provided.' + required: false + default: verbose: description: 'Verbose output' required: false diff --git a/entrypoint.sh b/entrypoint.sh index 2de362a..71d3c51 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -17,6 +17,7 @@ GITHUB_PAGES=$PAGES_GEM_HOME/bin/github-pages export JEKYLL_ENV="production" export JEKYLL_GITHUB_TOKEN=$INPUT_TOKEN export PAGES_REPO_NWO=$GITHUB_REPOSITORY +export JEKYLL_BUILD_REVISION=${INPUT_BUILD_REVISION:="$GITHUB_SHA"} # Set verbose flag if [ "$INPUT_VERBOSE" = 'true' ]; then