2022-03-01 15:57:56 -05:00
|
|
|
name: "TLS protocol scan"
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
# The branches below must be a subset of the branches above
|
|
|
|
branches: [main]
|
|
|
|
|
2022-07-11 14:54:49 -05:00
|
|
|
permissions: read-all
|
|
|
|
|
2022-03-01 15:57:56 -05:00
|
|
|
jobs:
|
|
|
|
tls-check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: TLS check
|
|
|
|
steps:
|
2023-09-05 14:30:49 -05:00
|
|
|
- uses: actions/checkout@v4
|
2023-12-12 05:44:28 -05:00
|
|
|
- uses: actions/setup-go@v5
|
2022-03-01 15:57:56 -05:00
|
|
|
with:
|
2023-03-22 14:33:21 -05:00
|
|
|
cache: false
|
2023-04-27 02:09:46 -05:00
|
|
|
go-version: 1.20.x
|
2022-03-01 15:57:56 -05:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE
|
|
|
|
mkdir -p test/data
|
|
|
|
cd test/data
|
|
|
|
../scripts/gen_certs.sh
|
|
|
|
- name: Check for TLS settings
|
|
|
|
run: |
|
|
|
|
cd $GITHUB_WORKSPACE
|
2023-09-06 11:58:00 -05:00
|
|
|
make binary
|
2023-10-27 12:39:04 -05:00
|
|
|
bin/zot-linux-amd64 serve examples/config-tls.json & echo $! > zot.PID
|
2022-03-01 15:57:56 -05:00
|
|
|
sleep 5
|
2023-10-27 12:39:04 -05:00
|
|
|
# Check if zot server is running
|
|
|
|
cat /proc/$(cat zot.PID)/status | grep State || exit 1
|
|
|
|
|
|
|
|
# zot server is running: proceed to testing
|
|
|
|
./test/scripts/tls_scan.sh
|