Welcome back,

Every software developer usually use github.

Github actions has kind benefits. I want to give example.

Scenario 1:

A Branch -> merge -> master branch
and we want to master branch build check.

Scenario 2:

We created new pull request on github and we want to build check on new branch.

Scenario 3:

When we merge new branch, we will push new image to docker.

While doing all this, we will can run test and we can set the coverage limit.

Sometimes, we have a depend some package. Don’t worry because we can install before build check. I want to give example for scenario 1.

I have a dot net core project on github. If you check github menu, you can will see Actions bar click and again click to set up a workflow yourself.

name: .NET

    branches: [ master ]


    runs-on: ubuntu-latest

    - uses: actions/checkout@v2
    - name: Setup .NET
      uses: actions/setup-dotnet@v1
        dotnet-version: 5.0.x
    - name: Restore dependencies
      run: dotnet restore
    - name: Build
      run: dotnet build --no-restore
  • name: Your action name.
  • on: When does it work?
  • push: If this is a push action, it will runs.
  • branches: Which branch?
  • jobs: Jobs to work.
  • build: Job name.
  • runs-on: Which work on server?
  • steps: Job’s steps.
  • name: Step’s name.
  • uses: Use another action repo.
  • with: Select dotnet version or another language version.
  • run: Terminal command.

Finally, now if you marge new commit, please check actions tab because run new action and you can watch if you will click.

Let’s challenges, can you prepare scenario 2-3 ?

If you prepared, please send comment or mail 🙂

Yorum bırakın

E-posta hesabınız yayımlanmayacak.

Translate »