From 7aa013921c53f7d1f2a78cee28b342508f80fd01 Mon Sep 17 00:00:00 2001 From: Lauro Fialho Mueller Date: Sat, 28 Oct 2023 15:40:44 +0200 Subject: [PATCH] feat(01-building-blocks): add README --- .github/workflows/01-building-blocks.yaml | 3 +++ 01-building-blocks/README.md | 29 +++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 01-building-blocks/README.md diff --git a/.github/workflows/01-building-blocks.yaml b/.github/workflows/01-building-blocks.yaml index 55cc410..07aeec8 100644 --- a/.github/workflows/01-building-blocks.yaml +++ b/.github/workflows/01-building-blocks.yaml @@ -1,3 +1,6 @@ +# See 01-building-blocks/README.md for more information +# about the building blocks of GitHub Actions + name: 01 - Building Blocks on: push diff --git a/01-building-blocks/README.md b/01-building-blocks/README.md new file mode 100644 index 0000000..bc2a930 --- /dev/null +++ b/01-building-blocks/README.md @@ -0,0 +1,29 @@ +# GitHub Actions Workflows, Jobs, and Steps + +GitHub Actions is a powerful automation tool that allows you to build, test, and deploy your code right from your GitHub repository. Understanding the key building blocks — workflows, jobs, and steps — is essential for effective automation. + +## Workflows + +A workflow is a customizable, automated process that you can define in your repository. It's typically used for continuous integration (CI), continuous deployment (CD), and other automation tasks. Here are the important aspects of workflows: + +- **Trigger**: Workflows are triggered by specific events, such as pushes, pull requests, or scheduled events. You define when and how a workflow runs. See the [triggering-workflows](../triggering-workflows/README.md) folder for more information about triggering workflows. + +- **YAML Configuration**: Workflows are defined in a YAML file (e.g., `.github/workflows/main.yml`) within your repository. This configuration file specifies the workflow's name, triggers, jobs, and steps. + +## Jobs + +A job is a unit of work within a workflow. You can have multiple jobs in a workflow, and they can run in parallel or sequentially. Here are the key points about jobs: + +- **Runs-On**: Each job specifies the runner environment, such as Ubuntu, macOS, or Windows. You choose the environment that best suits your workflow. + +- **Parallelism**: You can configure jobs to run concurrently, which can speed up your workflow's execution time. + +## Steps + +A step is an individual task within a job. Steps are the smallest building blocks of a workflow and are where the actual work happens. Here are the important aspects of steps: + +- **Name**: Each step has a name that helps identify its purpose. It appears in the GitHub Actions log to provide clarity during execution. + +- **Run Commands**: Steps execute commands or scripts. These can include shell commands, script files, or even invoking actions from external sources (GitHub Marketplace, your own custom actions, etc.). + +- **Inputs and Outputs**: Steps can have inputs and produce outputs, allowing them to communicate and share data with other steps. \ No newline at end of file