1) What is Actions?
2) Essential terminology
3) Review of workflow example
4) How to setup?
is a configurable automated process that will run jobs.
Can be triggered by:
Defined in the .github/workflows directory in a repository,
so you can have multiple workflows in one repository.
is a specific activity in a repository that triggers a workflow run.
For example:
Complete list of events: click
is a set of steps in a workflow that is executed on the same runner.
Each step is either a shell script that will be executed, or an action that will be run.
Steps are executed in order and are dependent on each other.
Jobs have no dependencies and run in parallel with each other (can be configured).
is a custom application for the GitHub Actions platform that performs a complex but frequently repeated task.
You can write your own actions, or you can find existing in the GitHub Marketplace.
For example:
is a server that runs your workflows when they're triggered.
You can use GitHub-hosted runners or self-hosted runners.
Each runner can run a single job at a time.
name: CI
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Run tests
run: go test ./...
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
1) Create yaml file in repo in .github/workflow folder
2) Configure events
3) Describe jobs
✅ Done!