-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.41 KB
/
Copy pathtest-example-com.yml
File metadata and controls
52 lines (42 loc) · 1.41 KB
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
name: Test functioning using example.com
on: [push]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: build deps
run: |
sudo apt-get install --no-install-recommends -y -q libwolfssl-dev libnghttp2-dev
- name: build
run: |
make
- name: self-sign certs
run: |
openssl req -nodes -newkey rsa:4096 -keyout test.key -out test.csr \
-subj "/C=IT/ST=Rome/L=Rome/O=Local Host/OU=Testing Department/CN=example.com" \
&& openssl x509 -req -sha256 -days 365 \
-in test.csr -signkey test.key -out test.crt
- name: launch
run: |
./src/dohd -c test.crt -k test.key -p 8053 -d 8.8.8.8 -F -v &
- name: download latest curl
uses: dsaltares/fetch-gh-release-asset@master
with:
repo: "moparisthebest/static-curl"
version: "tags/v7.81.0"
file: "curl-amd64"
target: "curl"
token: ${{ secrets.GITHUB_TOKEN }}
- name: test dohd resolution of example.com
run: |
sudo chmod a+x ./curl
sleep 5
./curl -s --doh-url https://127.0.0.1:8053 --doh-insecure https://example.com | grep -q "Example Domain"