Skip to content

Latest commit

 

History

History
41 lines (34 loc) · 1.93 KB

exercise-05.md

File metadata and controls

41 lines (34 loc) · 1.93 KB

Exercise 5 - basic git Action pipline

  • In your repository on GitHub.com, create a workflow file called github-actions-demo.yml in the .github/workflows directory. To do this:

  • If the .github/workflows directory already exists, navigate to that directory on GitHub, click Add file, then click Create new file, and name the file github-actions-demo.yml.

  • If your repository doesn't have a .github/workflows directory, go to the main page of the repository on GitHub, click Add file, then click Create new file, and name the file .github/workflows/github-actions-demo.yml. This creates the .github and workflows directories and the github-actions-demo.yml file in a single step.

name: GitHub Actions Demo
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 }}."
  • git add . 

  • git commit -m "Commit message"

  • git push


Exercise Time: 30 Minutes


MIT Licensed and prepared for Varsity College by Cyber-Mint (Pty) Ltd
Teamfu ™ is a trademark of Cyber-Mint (Pty) Ltd.
© Copyright 2022, Cyber-Mint (Pty) Ltd.