Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ jobs:
echo "Generating map..."
cd generator
chmod +x cicd_gen.sh
./cicd_gen.sh
./cicd_gen.sh "config.sample.json"
cp map.bin ../pages/
./cicd_gen.sh "config.mcast.sample.json"
cp map.bin ../pages/mcmap.bin
cd ..

echo "Placing public sources..."
Expand Down
6 changes: 4 additions & 2 deletions generator/cicd_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ set -ex
registry_path="https://${GIT_DN42_TOKEN}@git.dn42.dev/dn42/registry.git"
[ -e dn42registry ] && (cd dn42registry; git pull) || git clone "$registry_path" dn42registry --depth 1 --single-branch
[ -e map.bin ] && rm map.bin
config="$1"
[ -z "$config" ] && config="config.sample.json"
go mod download
go build -o mapdn42
cp config.sample.json config.json
./mapdn42
cp "$config" config.json
./mapdn42
18 changes: 18 additions & 0 deletions generator/config.mcast.sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"registry_path": "./dn42registry",
"output_file": "./map.bin",
"post_generation_command": "",
"mrt_collector": {
"ipv4_mrt_dump_url": "https://mrt.iedon.net/multicast4_latest.mrt.bz2",
"ipv6_mrt_dump_url": "https://mrt.iedon.net/multicast6_latest.mrt.bz2",
"username": "CanAlsoSpecifyInEnv",
"password": "CanAlsoSpecifyInEnv",
"insecure_skip_verify": true,
"custom_dns_server": ""
},
"api": {
"enabled": false,
"listen_addr": ":8080",
"auth_token": "your-secret-token-here"
}
}