DevOps Classroom notes 26/Apr/2025

Github Actions

  • Github Actions run workflows on github events such as
    • push
    • pull request
    • schedule etc..
  • Github actions workflow is a yaml file which is stored in .github/workflows folder
  • Workflows run on Runners. Runners are of two types

Pricing

Here’s the GitHub Actions pricing comparison between open-source (public repositories) and private projects:

Feature Open-Source Projects (Public Repos) Private Projects
GitHub-hosted runners Free (unlimited minutes)[1][2] Limited free minutes based on plan (see below), then pay-per-use[1][5]
Storage included Not specified 500 MB (Free) to 50 GB (Enterprise Cloud)[1][5]
Overage charges Not applicable Storage: $0.008/GB/day[1]Minutes:- Linux: $0.008/min- Windows: $0.016/min- macOS: $0.08/min[5]

Private project plans (monthly free minutes/storage):

Plan Free Minutes Free Storage
GitHub Free 2,000 500 MB
GitHub Pro 3,000 1 GB
GitHub Team 3,000 2 GB
GitHub Enterprise Cloud 50,000 50 GB

Note: Larger runners (not standard) always incur charges, even for public repositories[1]. Self-hosted runners remain free for both public and private repos[1][9].

Citations:
[1] https://docs.github.com/billing/managing-billing-for-github-actions/about-billing-for-github-actions
[2] https://github.com/pricing
[3] https://github.com/pricing/calculator
[4] https://docs.github.com/get-started/learning-about-github/githubs-products
[5] https://octopus.com/devops/github-actions/
[6] https://projectmanagers.net/github-pricing/
[7] https://docs.github.com/en/apps/github-marketplace/listing-an-app-on-github-marketplace/setting-pricing-plans-for-your-listing
[8] https://www.upguard.com/blog/bitbucket-vs-github
[9] https://docs.github.com/en/actions/administering-github-actions/usage-limits-billing-and-administration


Answer from Perplexity: pplx.ai/share

Workflow YAML

  • Workflow has
    • Events: Which trigger workflow
    • Jobs:
      • Each job executes on a runner
      • job consists of steps
        • A step can be acheived
          • actions
          • run

First Workflow : Spring petclinic

  • Whenever developer raises a pull request execute mvn package
  • Refer Here for repository
  • For screen shots watch classroom video
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Day build

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - name: Set up JDK 17
      uses: actions/setup-java@v4
      with:
        java-version: '17'
        distribution: 'temurin'
        cache: maven
    - name: Build with Maven
      run: mvn clean package

How to write a Workflow

Exercise:

Setup self hosted runner.

Test results and uploading artficats

  • Refer Here for yaml
  • Exercise:
    • try publishing the nop commerce publish folder zip
    • Try executing the workflow on pull request and show test results
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%