From e3750df6193f043d2a2395952e5de9190a0827a5 Mon Sep 17 00:00:00 2001 From: Nick Alteen Date: Fri, 1 Sep 2023 14:18:59 -0400 Subject: [PATCH] Correct input name --- .github/workflows/ci.yml | 4 ++-- README.md | 10 +++++----- entrypoint.sh | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e956946..a5cb308 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,10 +45,10 @@ jobs: - name: Run the Container id: run env: - INPUT_WHO_TO_GREET: Mona Lisa Octocat + INPUT_WHO-TO-GREET: Mona Lisa Octocat run: | docker run \ - --env INPUT_WHO_TO_GREET="Mona Lisa Octocat" \ + --env INPUT_WHO-TO-GREET="Mona Lisa Octocat" \ --rm ${{ env.TEST_TAG }} test-action: diff --git a/README.md b/README.md index 642b755..7a54870 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ need to perform some initial setup steps before you can develop your action. You can pass individual environment variables using the `--env` or `-e` flag. ```bash - $ docker run --env INPUT_WHO_TO_GREET="Mona Lisa Octocat" actions/container-action + $ docker run --env INPUT_WHO-TO-GREET="Mona Lisa Octocat" actions/container-action ::notice file=entrypoint.sh,line=7::Hello, Mona Lisa Octocat! ``` @@ -63,7 +63,7 @@ need to perform some initial setup steps before you can develop your action. ```bash $ cat ./.env.test - INPUT_WHO_TO_GREET="Mona Lisa Octocat" + INPUT_WHO-TO-GREET="Mona Lisa Octocat" $ docker run --env-file ./.env.test actions/container-action @@ -90,10 +90,10 @@ container actions: - Inputs are accessed using environment variables with the format `INPUT_`. For example, this action has an input called `who-to-greet`, which can be accessed in the entrypoint script using - `INPUT_WHO_TO_GREET`. + `INPUT_WHO-TO-GREET`. ```bash - GREETING="Hello, $INPUT_WHO_TO_GREET!" + GREETING="Hello, $INPUT_WHO-TO-GREET!" ``` - GitHub Actions supports a number of different workflow commands such as @@ -140,7 +140,7 @@ So, what are you waiting for? Go ahead and start customizing your action! ```bash docker build -t actions/container-action . - docker run --env INPUT_WHO_TO_GREET="Mona Lisa Octocat" actions/container-action + docker run --env INPUT_WHO-TO-GREET="Mona Lisa Octocat" actions/container-action ``` 1. Commit your changes diff --git a/entrypoint.sh b/entrypoint.sh index 22c9865..381820b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/sh -l # Use INPUT_ to get the value of an input -GREETING="Hello, $INPUT_WHO_TO_GREET!" +GREETING="Hello, $INPUT_WHO-TO-GREET!" # Use workflow commands to do things like set debug messages echo "::notice file=entrypoint.sh,line=7::$GREETING"