Skip to content

Commit

Permalink
feat(01-building-blocks): add README
Browse files Browse the repository at this point in the history
  • Loading branch information
lauromueller committed Oct 28, 2023
1 parent 67b6905 commit 7aa0139
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/01-building-blocks.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
29 changes: 29 additions & 0 deletions 01-building-blocks/README.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 7aa0139

Please sign in to comment.