Lotto Buy Bot (로또 구매봇) #83
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
name: Lotto Buy Bot (로또 구매봇) | |
on: | |
schedule: | |
- cron: "50 23 * * 5" # UST 기준의 크론. UST 23:50 는 KST 08:50 | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9.21] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install python package | |
run: | | |
pip install selenium | |
pip install requests | |
pip install twython | |
pip install pillow | |
pip install gspread | |
pip install beautifulsoup4 | |
pip install lxml | |
pip install pytz | |
pip install --upgrade google-api-python-client oauth2client | |
pip install playwright | |
python -m playwright install ${{ matrix.browser-channel }} --with-deps | |
- name: Install ubuntu package | |
run: | | |
sudo apt-get install fonts-unfonts-core | |
sudo apt-get install fonts-unfonts-extra | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add | |
sudo apt-get install google-chrome-stable | |
wget https://chromedriver.storage.googleapis.com/100.0.4896.20/chromedriver_linux64.zip | |
unzip ./chromedriver_linux64.zip | |
- name: Run for buying Lotto! | |
run: | | |
python ./buy_lotto.py ${{secrets.USER_ID}} ${{secrets.USER_PW}} ${{secrets.SLACK_BOT_TOKEN}} ${{secrets.SLACK_CHANNEL}} ${{secrets.BUY_COUNT}} |