Hands-on – your first action
The power of GitHub Actions lies in its reusability, so understanding how to create and use Actions is important. In this hands-on exercise, you will create a container action that runs inside a Docker container.
Tip
You can find this example at https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action and you can copy and paste the content of the text files from there. If you want, you can also use the template repository at https://github.com/actions/container-action and click Use this template. It will create a repository with all files in it for you.
The steps are as follows:
- Create a new repository called
hello-world-docker-action
and clone it to your workstation. - Open a Terminal and navigate to the repository:
$ cd hello-world-docker-action
- Create a file called
Dockerfile
without an extension. Add the following content to it:# Container image that runs your code FROM alpine:3.10 # Copies...