Reusing workflows: If you have a bunch of jobs all doing a similar thing (e.g.Environment variables: most of the ‘context’ properties are also exposed as environment variables to make it easier for your shell commands/scripts to utilise.Commands: when executing a shell command (or script) you can use echo with a specific format and, depending on the format used, it’ll take on special meaning to the workflow runner and can be used (among other things) for displaying rich messaging in the GitHub UI.Syntax: this is the most important page as it details all the yaml configuration syntax (so I come here often).Contexts: there are lots of contextual objects your jobs can use, such as objects for getting information about git (what branch we’re dealing with, the commit SHA etc), environment variables, secrets, data exposed by other jobs and lots more. ![]() Expressions: explains how to use GitHub’s builtin functions, like contains(), fromJSON(), and functions like success() and failure() that tell you the state of previous steps that have run.Unfortunately it’s so thorough that it can be a bit overwhelming, but don’t worry, once you’ve gotten familiar with the various concepts you’ll start to remember where the important information is located. I would strongly suggest bookmarking the official documentation because it’s very thorough. If you need jobs to run sequentially, then you’ll need to configure a job to depend on another job using the needs property (we’ll see an example of this later). NOTE: Each job you define will run in parallel. Events: an event determines when your ‘jobs’ should run.Steps: each ‘step’ does something useful (e.g.Jobs: a job represents a collection of ‘steps’.I think it’s well worth your time learning how to run your CI/CD pipelines via GitHub Actions, and in this post that’s exactly what we’re going to dig into.Ī workflow is a yaml configuration file that defines: I’ve been using GitHub Actions a lot recently and I’ve found it to be immensely flexible and feature rich. ![]() Build, test, and deploy your code right from GitHub. GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD.
0 Comments
Leave a Reply. |