mirror of https://github.com/streamlink/streamlink
ci: add useragents workflow
- Update user agents once a month, open pull request via streamlinkbot - Ignore CI runs when pushing branches with automated changes
This commit is contained in:
parent
e3e3f118e5
commit
2f101a8172
|
@ -1,7 +1,9 @@
|
|||
name: Test, build and deploy
|
||||
|
||||
on:
|
||||
push: {}
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'automated/**'
|
||||
pull_request: {}
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
name: Update user agents
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 1 * *'
|
||||
|
||||
jobs:
|
||||
update-user-agents:
|
||||
if: github.repository == 'streamlink/streamlink'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: "3.10"
|
||||
- run: python -m pip install requests
|
||||
- run: python ./script/update-user-agents.py
|
||||
env:
|
||||
WHATISMYBROWSER_API_KEY: ${{ secrets.WHATISMYBROWSER_API_KEY }}
|
||||
- uses: peter-evans/create-pull-request@10db75894f6d53fc01c3bb0995e95bd03e583a62
|
||||
with:
|
||||
token: ${{ secrets.STREAMLINKBOT_USERAGENTS_PR }}
|
||||
add-paths: |
|
||||
src/streamlink/plugin/api/useragents.py
|
||||
commit-message: "plugin.api: update useragents"
|
||||
committer: "streamlinkbot <streamlinkbot@users.noreply.github.com>"
|
||||
author: "streamlinkbot <streamlinkbot@users.noreply.github.com>"
|
||||
branch: "automated/plugin/api/useragents"
|
||||
branch-suffix: timestamp
|
||||
delete-branch: true
|
||||
title: "plugin.api: update useragents"
|
||||
body: "Automated pull request"
|
Loading…
Reference in New Issue