First if you don’t know the basics of Github Actions I recommend you go read the Starting Guide.
# See https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions for more information about the action.yml syntax
name: 'My Action'
description: 'What it does..'
description: 'Your name'
# This Dockerfile is inspired from the official document see https://docs.github.com/en/actions/creating-actions/creating-a-docker-container-action
FROM node:16-alpine # you can the version of your liking see https://hub.docker.com/_/node for more information
COPY github-action-src /github/github-action-src # we need our Github action source files to be available inside the container so let's copy them to "/github/github-action-src" for now.
COPY entrypoint.sh /entrypoint.sh
# let's create a specific folder for the source files of our github action
mkdir github-action-src # "github/github-action-src" is the folder we put our Github Action source files into using our Dockerfile
cp -r /github/github-action-src . # now let's copy that folder into the folder for the entire repository "/github/workspace"
# as we are currently inside the github workspace (/github/workspace) containing the source files of the entire repository
# we will need to cd into the folder we previously created "github-action-src"
# you could also copy build files and such to "github-action-src" if you need to
If you have any question please send me a mail at email@example.com.