Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Anatomy of an action
Earlier you learned how the different pieces of the GitHub Actions feature work together. Now you will learn about the components that make up an individual action.
Remember, and action is the unit of work that a workflow file executes when it reaches that task. They are called by referencing them as the value to the
uses:
key in a workflow step.What makes up an action?
JavaScript actions are consist of two key components:
action.yml
Let's take a look at how those components fit in with the workflow file.
Although the workflow file is used to allow us to set the
inputs
andoutputs
using thewith:
keyword it is not a required component of an individual action.The failing workflow
Before we jump into the details of action metadata, it might be helpful to examine our workflow to understand the order that things happen. I have attached a screenshot below of the most recent workflow run, you can also follow along by clicking on the Actions tab for your repository.
Notice that our third workflow step, the one that is looking for our action is failing. We expect this, but the magic ✨is in the error message!
That step is looking for a file named
action.yml
.Because
action.yml
is non-existent in thehello-world
directory we see this error. So let's start by talking about, and creating, the missingaction.yml
file.