Skip to content

Commit

Permalink
fix: wrong branch push
Browse files Browse the repository at this point in the history
  • Loading branch information
Vann-Dev committed Mar 21, 2024
1 parent 9003eae commit a6d8c91
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -1,40 +1,18 @@
name: Check and push proxies

on:
schedule:
- cron: '0 */3 * * *'
push:
branches:
workflow_run:
workflows:
- Get Proxies and push proxies
branches:
- main
types:
- completed

permissions:
contents: write

jobs:
get_proxies:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Get HTTP proxies
run: |
python3 proxyScraper.py -t 20 -s http -o proxies/http.txt
- name: Get HTTPS proxies
run: |
python3 proxyScraper.py -t 20 -s https -o proxies/https.txt
test_proxies:
runs-on: ubuntu-latest
strategy:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/getProxy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Get Proxies and push proxies

on:
schedule:
- cron: '0 */3 * * *'
push:
branches:
- main

permissions:
contents: write

jobs:
get_proxies:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Getting proxies
run: |
python3 proxyScraper.py -p http -o proxies/http.txt
python3 proxyScraper.py -p https -o proxies/https.txt
python3 proxyScraper.py -p socks4 -o proxies/socks4.txt
python3 proxyScraper.py -p socks5 -o proxies/socks5.txt
- name: Commit
run: |
git config --global user.email ${{ secrets.GIT_EMAIL }}
git config --local user.name ${{ secrets.GIT_NAME }}
git commit -am "feat: update proxies"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
env:
CI: true

0 comments on commit a6d8c91

Please sign in to comment.