From 4d6566e85d6b9320a781fb4fe42f1f8c31dc5c8e Mon Sep 17 00:00:00 2001 From: JargeZ Date: Fri, 23 Aug 2024 14:37:47 +1000 Subject: [PATCH] Make more generic --- action.yml | 4 ++++ entrypoint.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index e220531..e5cd725 100644 --- a/action.yml +++ b/action.yml @@ -10,6 +10,10 @@ runs: inputs: name: description: Fly app name + event_action: + description: Event action name + default: ${{ github.event.action }} + required: true image: description: Optional pre-existing Docker image to use config: diff --git a/entrypoint.sh b/entrypoint.sh index 5a8be42..3ac92ee 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -14,7 +14,7 @@ if [ -z "$PR_NUMBER" ]; then fi GITHUB_REPOSITORY_NAME=${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/} -EVENT_TYPE=$(jq -r .action /github/workflow/event.json) +EVENT_TYPE=$INPUT_EVENT_ACTION # Default the Fly app name to pr-{number}-{repo_owner}-{repo_name} app="${INPUT_NAME:-pr-$PR_NUMBER-$GITHUB_REPOSITORY_OWNER-$GITHUB_REPOSITORY_NAME}"