GitHub Actions Workshop

Master GitHub Actions with hands-on labs and exercises. Learn how to automate workflows, run tests, deploy applications, and more using GitHub's powerful automation platform. This repository has everything you need to get started with continuous integration and continuous deployment.


Project maintained by prasadhonrao Hosted on GitHub Pages — Theme by mattgraham

Solution: Using Git CLI in GitHub Actions

name: Misc - Git CLI Integration
on:
  workflow_dispatch:
  push:
    paths:
      - '.github/workflows/misc-misc-misc-git-cli-integration.yml'
jobs:
  run-on-ubuntu-latest:
    runs-on: ubuntu-latest
    env:
      GH_TOKEN: $
    steps:
      - uses: actions/checkout@v4
      - run: env
      - run: gh --version
      - run: gh auth status
      - run: gh repo list
      - run: gh workflow list
  run-on-windows-latest:
    runs-on: windows-latest
    env:
      GH_TOKEN: $
    steps:
      - uses: actions/checkout@v4
      - run: env
      - run: gh --version
      - run: gh auth status
      - run: gh repo list
      - run: gh workflow list
  run-on-macos-latest:
    runs-on: macos-latest
    env:
      GH_TOKEN: $
    steps:
      - uses: actions/checkout@v4
      - run: env
      - run: gh --version
      - run: gh auth status
      - run: gh repo list
      - run: gh workflow list
  run-on-self-hosted:
    runs-on: self-hosted
    env:
      GH_TOKEN: $
    steps:
      - uses: actions/checkout@v4
      # - run: env # Code commented as env command is not available in Windows
      - run: gh --version
      - run: gh auth status
      - run: gh repo list
      - run: gh workflow list