Create a New Project and Push Code

Create a New Repository

This repository will be used to run GitHub Actions.

  • First, log into your GitHub account.
  • Select Repositories.
  • Choose New.

image

  • Enter the repository name: terraform-cicd
  • Enter a description: Use for CI/CD
  • Select Public.
  • Click Create repository.

image

  • Repository creation is complete.

image

Push Code

Access the virtual machine where you have cloned and edited your code.

  • Use the command to set up remote repo.
  • Check if remote setup was successful.
git remote set-url origin "GitHub repo link"
git remote -v

image

  • Use the following commands to push your code to the newly created repository.
git add .
git commit -m "Fist commit"
git branch -M main
git push -u origin main

image

  • Verify in the GitHub repository to see if the code has been successfully pushed.

image