Source: towardsdatascience.com

Introduction to GitHub Actions

Category: Database, Docker, github, automation, yaml

GitHub Actions can be a little confusing if you’re new to DevOps and the CI/CD world, so in this article, we’re going to explore some features and see what we can do using the tool. From the point of view of CI/CD, the main goal of GitHub Actions and Workflows is to test our software every time something changes.

Go ahead and create a first_workflow.yml file inside .github/workflows on your repo, then paste this code: Now if you commit this file to your repository, push it and go to the Actions tab on the GitHub website you can see the new workflow, check all the runs and view the outputs: Actions are individual tasks and we can use them from three sources: They run as a step in our workflow.

Since we want to run a script from our own repository we also need to use the checkout action to access it.

Since it’s a composite action we’ll use the using: "composite" syntax: If an action is defined in the same repository as the workflow we can refer to it using ./path-to-action-file.

Related Articles