diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8d20e2e..bde4cc0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,3 +4,4 @@ updates: directory: / schedule: interval: daily + time: "05:00" diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 0000000..505b091 --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,16 @@ +name: Auto-merge updates +on: pull_request +permissions: + contents: write +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref }} + cancel-in-progress: true +jobs: + auto-merge-updates: + runs-on: ubuntu-latest + if: ${{ github.actor == 'monosans' && startsWith(github.head_ref, 'update/') }} + steps: + - run: gh pr merge --auto --delete-branch --squash "${PR_URL}" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8caac0c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,16 @@ +name: CI +on: + push: + branches: + - main + pull_request: + workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true +jobs: + run-pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - run: pipx run pre-commit run --all-files diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml new file mode 100644 index 0000000..2acc0c6 --- /dev/null +++ b/.github/workflows/update-dependencies.yml @@ -0,0 +1,29 @@ +name: Update dependencies +on: + workflow_dispatch: + schedule: + - cron: 0 6 * * * +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +jobs: + update-dependencies: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - cmd: pipx run pre-commit autoupdate + commit-msg: Update .pre-commit-config.yaml + branch: update/pre-commit-config + steps: + - uses: actions/checkout@v3 + - run: ${{ matrix.cmd }} + - uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.PAT }} + commit-message: ${{ matrix.commit-msg }} + committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> + branch: ${{ matrix.branch }} + title: ${{ matrix.commit-msg }} + body: diff --git a/.gitignore b/.gitignore index f8a9cdf..f994b1e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,3 @@ -proxies/ -proxies_anonymous/ -proxies_geolocation/ -proxies_geolocation_anonymous/ - # Created by https://www.toptal.com/developers/gitignore/api/emacs,jetbrains+all,linux,macos,notepadpp,python,sublimetext,vim,visualstudiocode,windows # Edit at https://www.toptal.com/developers/gitignore?templates=emacs,jetbrains+all,linux,macos,notepadpp,python,sublimetext,vim,visualstudiocode,windows @@ -466,3 +461,8 @@ $RECYCLE.BIN/ *.lnk # End of https://www.toptal.com/developers/gitignore/api/emacs,jetbrains+all,linux,macos,notepadpp,python,sublimetext,vim,visualstudiocode,windows + +proxies/ +proxies_anonymous/ +proxies_geolocation/ +proxies_geolocation_anonymous/ diff --git a/README.md b/README.md index e20bb63..bd2261b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # proxy-scraper-checker +[![CI](https://github.com/monosans/proxy-scraper-checker/actions/workflows/ci.yml/badge.svg)](https://github.com/monosans/proxy-scraper-checker/actions/workflows/ci.yml) + ![Screenshot](screenshot.png) HTTP, SOCKS4, SOCKS5 proxies scraper and checker. @@ -17,7 +19,7 @@ You can get proxies obtained using this script in [monosans/proxy-list](https:// - Download and unpack [the archive with the program](https://github.com/monosans/proxy-scraper-checker/archive/refs/heads/main.zip). - Edit `config.ini` according to your preference. -- Install [Python](https://python.org/downloads) (minimum supported version is 3.7). During installation, be sure to check the box `Add Python to PATH`. +- Install [Python](https://python.org/downloads) (minimum required version is 3.7). - Install dependencies and run the script. There are 2 ways to do this: - Automatic: