The purpose of this repo is to answer questions one might have about github actions, through examples. After you have seen the examples in this repo, you may want to also run them which is why anyone can test some of the actions by creating an issue that contains the action file's name (without the extension).
Each action will run when it detects an issue with it's name was created. It does this through the help of the issues
event.
Ready:question: Go:bangbang:
- 📂 Caching on Linux...
💬 In order to use the output from a step, you need atleast 3 things
- Create an id for the step. Mind the syntax.
- Create the output(s) using the
set-output
command - Use the id and the output name in another step
⏩ See outputs_from_step.yml
💬 There are two ways to create environment variables:
- ℹ️ By using the env keyword on the entire workflow, a job or a step. See
env
. Note: This variable CAN be used in the same place where it was created - ℹ️ Through Github Actions
set-env
. This will create an environment variable that can be used by all subsequent steps. Note: Variables created this way CANNOT be used in the same step where they were created, however following steps can see that variable
⏩ See step_param_from_env.yml
💬 See this Stackoverflow answer for more details
⏩ See cache_deps_ubuntu.yml
. (This one requires a push or pull_request event to be triggered and this is due mostly to a restriction of the cache
action.)