GitHub Actions is a CI/CD platform that allows you to automate, customize, and execute your software development workflows directly in your GitHub repository. This includes tasks like building, testing, and deploying code.


Why GitHub Actions?

  • Automated Testing and Deployment
    • Scenario: A university's IT department maintains several internal applications used by students and staff.
    • Use Case: GitHub Actions can automate the testing and deployment of these applications whenever changes are pushed to the repository, ensuring that updates are thoroughly tested and deployed efficiently.
  • Student Projects and Assignments
    • Scenario: Students in a software development course submit their projects via GitHub.
    • Use Case: GitHub Actions can be used to automatically run tests on student submissions, providing immediate feedback on code quality and functionality. This helps students learn and improve their coding skills through continuous integration practices.

Limitations

  • Each job in a workflow can run for up to 6 hours. If this limit is reached, the job is terminated.
  • Each workflow run is limited to 35 days. This includes execution duration and time spent waiting for approvals.
  • You can execute up to 1,000 requests to the GitHub API per hour across all actions within a repository.

Step-by-step: How to Start Using GitHub Actions

  1. Submit a Request:
    1. Since GitHub Actions are disabled by default, contact the IT department or the designated administrator to request the activation of GitHub Actions for your repository.
    2. Provide details about the intended workflows and the purpose of using GitHub Actions.
  2. Create a Workflow File:
    1. Once approved, create a workflow file in your repository. This file, written in YAML, defines the actions to be performed and the events that trigger them.
    2. Example:
      Example
      name: CI
      on: [push, pull_request]
      jobs:
        build:
          runs-on: ubuntu-latest
          steps:
          - uses: actions/checkout@v2
          - name: Set up Node.js
            uses: actions/setup-node@v2
            with:
              node-version: '14'
          - run: npm install
          - run: npm test

  3. Configure Permissions:
    1. Ensure that the necessary permissions are set for the GITHUB_TOKEN and any other secrets required by your workflows.
    2. Manage permissions at the organization level to control access and maintain security.
  4. Monitor and Maintain:
    1. Regularly monitor the workflows and logs to ensure they are running as expected.
    2. Update workflows as needed to adapt to changes in the project or environment.



Search Knowledge Base

Submit a Service Request