Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

q01 DevOps tools closes #1 and closes #2 #50

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build C++

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

jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y -f build-essential g++ cmake
build:
needs: install
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build project
run: g++ main.cpp --std=c++17 -o MyFave
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## "MyFave" | GitHub Actions (status badge)

[![Build C++](https://github.com/chrisheesh/MyFave/actions/workflows/actions.yml/badge.svg)](https://github.com/chrisheesh/MyFave/actions/workflows/actions.yml)


# MyFave

This is a simple C++ command line application to maintain a list of your favorites.
Expand Down
13 changes: 11 additions & 2 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,23 @@ int main(){
else{
cout << "What is your next favorite?\n";
}
cin >> input;
//<<<<<<< main

std::getline(std::cin, input);
//cin >> input;
//list.push_back(input);
//=======
//cin >> input;
favorites.push_back(input);
//>>>>>>> main
}while( input != "done" );

list.pop_back();

cout << "Your favorite list:\n";
for(int i = 0; i < favorites.size(); i++){
cout << favorites.at(i) << endl;
}

return 0;
}
}