diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9b9db0c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,16 @@ +name: compile + +on: + push: + branches: [ devops ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: compile + run: g++ -std=c++17 main.cpp + diff --git a/README.md b/README.md index bbcf55a..09dcccc 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,7 @@ I like that app too! -This repo is compatible with the [cpp-container docker container](https://github.com/ChicoState/cpp-container). \ No newline at end of file +This repo is compatible with the [cpp-container docker container](https://github.com/ChicoState/cpp-container). + +[![Build C++](https://github.com/willowbrockhoff/autovalidate/actions/workflows/build.yml/badge.svg)](https://github.com/willowbrockhoff/autovalidate/actions/workflows/build.yml) + diff --git a/main.cpp b/main.cpp index d9884f9..8b4f54f 100644 --- a/main.cpp +++ b/main.cpp @@ -27,10 +27,12 @@ int main(){ do{ cout << "What's next?\n"; getline(cin,input); - transform(input.begin(), input.end(), input.begin(), [](unsigned char c){ return std::tolower(c); }); - pick = rand() % VALIDATION.size(); + if(input == "nothin"){ + break; + } + pick = rand() % 4; cout << VALIDATION[pick] << "!\n"; - }while( input != "nothing" ); + }while(true); return 0; } \ No newline at end of file