-
Notifications
You must be signed in to change notification settings - Fork 6
68 lines (58 loc) · 2.08 KB
/
refresh-bettertls-testcases.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
name: Refresh BetterTLS testcases
on:
workflow_dispatch:
push:
branches:
- ww/bettertls
schedule:
# tuesday every other month at 5PM UTC
- cron: "0 17 * */2 2"
jobs:
refresh:
runs-on: ubuntu-latest
permissions:
contents: write # for branch creation
pull-requests: write # for PR creation
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ">=3.11"
cache: "pip"
cache-dependency-path: pyproject.toml
- name: Check out BetterTLS
uses: actions/checkout@v4
with:
repository: Netflix/bettertls
ref: master
path: bettertls
- name: Build BetterTLS JSON
run: |
go build -C bettertls/test-suites/cmd/bettertls/ -o /tmp/bettertls
/tmp/bettertls export-tests | jq . > /tmp/bettertls.json
if [[ -f limbo/_assets/bettertls.json ]]; then
# Only update if the betterTlsRevision has changed
old_revision=$(jq -r .betterTlsRevision limbo/_assets/bettertls.json)
new_revision=$(jq -r .betterTlsRevision /tmp/bettertls.json)
if [[ "${old_revision}" != "${new_revision}" ]]; then
mv /tmp/bettertls.json limbo/_assets/bettertls.json
else
echo "::notice::BetterTLS did not change, not updating"
fi
else
mv /tmp/bettertls.json limbo/_assets/bettertls.json
fi
- name: create PR
uses: peter-evans/create-pull-request@a4f52f8033a6168103c2538976c07b467e8163bc # v6.0.1
with:
commit-message: "[BOT] update BetterTLS testcases"
branch: update-BetterTLS-testcases
branch-suffix: timestamp
title: "[BOT] update BetterTLS testcases"
body: |
This is an automated pull request, updating the cached BetterTLS testcases
in Limbo.
Please review manually before merging.
add-paths: limbo/_assets/bettertls.json
assignees: "woodruffw"
reviewers: "woodruffw"