Skip to content

Refresh BetterTLS testcases #25

Refresh BetterTLS testcases

Refresh BetterTLS testcases #25

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"