Skip to content

Refresh BetterTLS testcases #62

Refresh BetterTLS testcases

Refresh BetterTLS testcases #62

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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Check out BetterTLS
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: Netflix/bettertls
ref: master
path: bettertls
persist-credentials: false
- 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@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
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"