forked from ulixee/unblocked
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (79 loc) · 2.77 KB
/
new-profiles.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: 'Profiles'
on:
workflow_dispatch:
inputs:
clearPlugins:
description: 'Redo any plugin-ids (comma separated)'
required: false
schedule:
- cron: '0 7 * * *'
jobs:
profiler:
name: 'Update Browser Profiles'
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Install pcap
run: sudo apt-get install -y libpcap-dev
- uses: actions/checkout@v3
with:
ref: main
token: ${{ secrets.PAT }}
repository: ulixee/browser-profile-data
path: browser-profile-data
- uses: actions/checkout@v3
with:
ref: main
submodules: 'recursive'
path: unblocked
- uses: actions/checkout@v3
with:
ref: main
repository: ulixee/shared
path: shared
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
cache-dependency-path: unblocked/yarn.lock
- name: Install ulixee/shared
run: yarn build
working-directory: ./shared
- name: Install unblocked
run: yarn build
working-directory: ./unblocked
- name: Linux - Apt Install Chrome(s)
working-directory: ./unblocked/build
run: sudo $(npx install-browser-deps)
- name: 'Collect new Browserstack User Agents'
run: yarn workspace @ulixee/real-user-agents update:agents
working-directory: ./unblocked
env:
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- name: 'Update Real UserAgent Stats'
run: yarn workspace @ulixee/real-user-agents update
working-directory: ./unblocked
- name: 'Clear plugin-ids from manual'
if: ${{ github.event.inputs.clearPlugins }}
run: yarn workspace @ulixee/unblocked-browser-profiler profile:clean ${{ github.event.inputs.clearPlugins }}
working-directory: ./unblocked
- name: 'Collect new Browserstack Profiles'
run: yarn workspace @ulixee/unblocked-browser-profiler profile:browserstack
working-directory: ./unblocked
env:
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ always() }}
with:
branch: main
repository: ./browser-profile-data
commit_message: "chore(profiles): automatic updates"
- uses: stefanzweifel/git-auto-commit-action@v4
if: ${{ always() }}
with:
branch: main
repository: ./unblocked
push_options: '--no-verify'
commit_message: "chore(profiles): automatic updates"