Github Sheetcheat PDF
Github Sheetcheat PDF
GitHub Actions give you the flexibility to build automated software development lifecycle workflows. You can write individual
tasks, called actions, and combine them to create custom workflows in your repository. GitHub Actions are automated
processes allowing you to build, test, package, release, or deploy any code project on GitHub, but you can also use them to
automate any step of your workflow: merging pull requests, assigning labels, triaging issues to name a few.
GitHub automatically cancels it. Default: 360 environment. The job’ set of steps will be executed on
each of these configurations. The following exemple specifies 3
services nodejs versions on 2 operating systems:
Additional containers to host services for a job in a workflow. runs-on: ${{ matrix.os }}
These are useful for creating databases or cache services. strategy:
The runner on the virtual machine will automatically create a matrix:
network and manage the lifecycle of the service containers.
Each service is a named object in the services collection os: [ubuntu-16.04, ubuntu-18.04]
(redis or nginx for example) and can receive the same steps: node: [6, 8, 10]
use an action defined in the same repository as the workflow, objects providing access to aruntime
written in ${{ … }} block. Contexts are
information. The following
a public repository elsewhere on GitHub, or in a published objects are available: github, job, steps , runner, secrets,
Docker container image. Including the version of the action strategy and matrix.
you are using by specifying a Git ref, branch, SHA, or Docker
tag is strongly recommended: Artifact storage & Caching
uses: {owner}/{repo}@{ref} for actions in a public An artifact is a file or collection of files produced during a
repository workflow run that can be stored and shared between jobs in a
uses: {owner}/{repo}/{path}@{ref} for actions in a workflow run. Use actions actions/upload-artifact and
subdirectory of a public repository actions/download-artifact with parameters name and path
uses: ./path/to/dir for actions in a a subdirectory of to manipulate artifacts. Artifacts can be downloaded through the
the same repository Web interface for 90 days.
uses: docker://{image}:{tag} for actions on Docker For dependencies and other commonly reused files across runs
Hub of a given workflow, use the actions/cache action with
uses: docker://{host}/{image}:{tag} for actions in parameters:
a public registry key: The key used to save and search for a cache.
with path: The file path (absolute or relative to the working
A map of the input parameters defined by the action in its directory) on the runner to cache or restore.
action.yml file. When the acion is container based, special restore-keys: Optional - An ordered list of alternative keys
parameter names are: to use for finding the cache if no cache hit occurred for key.
args, a string that defines the inputs passed to a Docker
container’s ENTRYPOINT. It is used in place of the CMD -- uses: actions/checkout@v1
instruction in a Dockerfile. name: Cache node modules