-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7c8a13c
Showing
13 changed files
with
5,232 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: fetch-latest-megamillions | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: "0 */12 * * *" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: pip | ||
- name: Install Python dependencies | ||
run: |- | ||
cd $GITHUB_WORKSPACE/scraper | ||
pip install -r requirements.txt | ||
# https://github.com/MarketingPipeline/Python-Selenium-Action/blob/main/.github/workflows/Selenium-Action_Template.yaml | ||
- name: Installed OS package list | ||
run: apt list --installed | ||
- name: Removing previous chrome instances on runner | ||
run: sudo apt purge google-chrome-stable | ||
- name: Installing OS packages | ||
run: pip install chromedriver-autoinstaller selenium | ||
|
||
- name: Fetch latest Mega Millions numbers | ||
env: | ||
GITHUB_WORKSPACE: ${{ github.workspace }} | ||
run: |- | ||
cd $GITHUB_WORKSPACE/scraper | ||
python -m src.main megamillions | ||
cat $GITHUB_WORKSPACE/numbers/megamillions.csv | ||
- name: Commit megamillions.csv file if changed | ||
run: |- | ||
git diff | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "JEFF-bot" | ||
git add -A | ||
git commit -m "Update megamillions.csv" || exit 0 | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: fetch-latest-powerball | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: "0 */12 * * *" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
cache: pip | ||
- name: Install Python dependencies | ||
run: |- | ||
cd $GITHUB_WORKSPACE/scraper | ||
pip install -r requirements.txt | ||
# https://github.com/MarketingPipeline/Python-Selenium-Action/blob/main/.github/workflows/Selenium-Action_Template.yaml | ||
- name: Installed OS package list | ||
run: apt list --installed | ||
- name: Removing previous chrome instances on runner | ||
run: sudo apt purge google-chrome-stable | ||
- name: Installing OS packages | ||
run: pip install chromedriver-autoinstaller selenium | ||
|
||
- name: Fetch latest Powerball numbers | ||
env: | ||
GITHUB_WORKSPACE: ${{ github.workspace }} | ||
run: |- | ||
cd $GITHUB_WORKSPACE/scraper | ||
python -m src.main powerball | ||
cat $GITHUB_WORKSPACE/numbers/powerball.csv | ||
- name: Commit powerball.csv file if changed | ||
run: |- | ||
git diff | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "JEFF-bot" | ||
git add -A | ||
git commit -m "Update powerball.csv" || exit 0 | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.DS_Store | ||
.idea | ||
*.pyc | ||
*.bak | ||
*.dat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright 2024 Jeff Baranski | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.