-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Thank you for this course (and other ones as well). I've learned a ton from them.
The issue
While doing the course, I noticed that the Python Container Action does not print the expected output:
As evidence, I provide the Python Container Action jobs from this repo as well as my fork:
As you can see, both the output and the annotation are:
Hello, World! Time is 20:57:54 UTC.
Instead of the expected (like with the other container actions):
Hello, from a container github action 👋! Time is 20:57:54 UTC.
The fix
In the 06-authoring-actions/container-actions/python-container-action/action.yaml I replaced args with env to properly pass the input environmental variable to the container:
env:
INPUT_WHO_TO_GREET: ${{ inputs.who-to-greet }}
# # only needed when you want to use the positional arguments (sys.argv) in the Python script
# args:
# - ${{ inputs.who-to-greet }}It appears that the INPUT_WHO_TO_GREET is not injected automatically by GitHub, as you mentioned.
In the 06-authoring-actions/container-actions/shell-container-action/action.yaml, you can see that the INPUT_WHO_TO_GREET is populated manually.
Thank you again for the great courses you make!