The Current CI/CD tooling for our company is moving away from Jenkins and towards GitHub Actions. Learn some basics about GitHub Actions as a reulst.

What’s Git Actions

According to Github:

GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline. You can create workflows that run tests whenever you push a change to your repository, or that deploy merged pull requests to production.

If you have experience with CI/CD tooling, potentially with Genkins, you can view Github Actions as a similar but better tool to achive the same purpose.

Similarly, GitHub Actions can be used for:

  1. build and test
  2. deployment
  3. publish packges
  4. manage github(issues, lablels)
  5. and so so

A Quick Example

1. Create a Github Action Workflow YAML File

In your repository on GitHub, create a workflow file called github-actions-hello-world.yml in the .github/workflows directory.

2. Copy and Paste the Following Hello World YAML Content

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
name: GitHub Actions Hello World
run-name: ${{ github.actor }} is testing out GitHub Actions ๐Ÿš€
on: [push]
jobs:
  Explore-GitHub-Actions:
    runs-on: ubuntu-latest
    steps:
      - run: echo "๐ŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event."
      - run: echo "๐Ÿง This job is now running on a ${{ runner.os }} server hosted by GitHub!"
      - run: echo "๐Ÿ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
      - name: Check out repository code
        uses: actions/checkout@v4
      - run: echo "๐Ÿ’ก The ${{ github.repository }} repository has been cloned to the runner."
      - run: echo "๐Ÿ–ฅ๏ธ The workflow is now ready to test your code on the runner."
      - name: List files in the repository
        run: |
          ls ${{ github.workspace }}          
      - run: echo "๐Ÿ This job's status is ${{ job.status }}."

Commit the YAML File to the Repo

Committing the workflow file to your branch

View the Workflow Reulst

  1. On GitHub, navigate to the main page of the repository.
  2. Under your repository name, click Actions.
  3. In the left sidebar, click the workflow you want to display

Github Action Workflow

Github Action Workflow

GitHub Action Workflow

Compare GitHub Actions with Jenkins

GitHub Actions Impressions

  1. easy to learn and get started
  2. highly integrated with Github and developer friendly
  3. SaaS solution and team can choose to not maintain servers for CI/CD.
  4. Market place for sharing and reusing workflows

Jenkins

  1. open source software and plug-ins to extend functionality
  2. team need to maintain the servers for jenkins and jenkins agents
  3. not locked to one source code management platform(Github) and can have code on any repository, including Github, Gitlab, BitBucket, and others.
  4. learning curve is more steep