Skip to content

Commit 60f1731

Browse files
committed
use docker
1 parent c6e3571 commit 60f1731

File tree

4 files changed

+36
-19
lines changed

4 files changed

+36
-19
lines changed

.github/workflows/generate.yaml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,8 @@ jobs:
2121
- name: checkout
2222
uses: actions/checkout@v4
2323

24-
- name: install deps
25-
run: |
26-
sudo apt -qqq update
27-
sudo apt -qqq install \
28-
cpanminus \
29-
libdatetime-perl \
30-
libdevel-confess-perl \
31-
libjson-xs-perl \
32-
liblwp-protocol-https-perl \
33-
libtest-exception-perl \
34-
libtext-csv-xs-perl \
35-
libxml-libxml-perl \
36-
libyaml-perl
37-
cpanm --sudo -qn Data::Mirror Object::Anon
38-
3924
- name: generate data
40-
run: |
41-
mkdir -p _site/root _site/registrars
42-
bin/registrars.pl _site/registrars
43-
bin/root.pl > _site/root/_all.json
25+
run: docker compose run generate
4426

4527
- name: configure
4628
uses: actions/configure-pages@v4

Dockerfile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
FROM ubuntu:latest
2+
3+
RUN apt -qqq update
4+
5+
RUN apt -qqq install \
6+
cpanminus \
7+
libdatetime-perl \
8+
libdevel-confess-perl \
9+
libjson-xs-perl \
10+
liblwp-protocol-https-perl \
11+
libtest-exception-perl \
12+
libtext-csv-xs-perl \
13+
libxml-libxml-perl \
14+
libyaml-perl \
15+
gcc
16+
17+
RUN cpanm -qn Data::Mirror Object::Anon HTML5::DOM

bin/build.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
IFS=$'\n\t'
4+
5+
BASEDIR="$(dirname "$(dirname "$0")")"
6+
7+
mkdir -vp $BASEDIR/_site/root $BASEDIR/_site/registrars
8+
9+
$BASEDIR/bin/registrars.pl $BASEDIR/_site/registrars
10+
exit
11+
12+
$BASEDIR/bin/root.pl > $BASEDIR/_site/root/_all.json

compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
services:
2+
generate:
3+
build: .
4+
volumes:
5+
- .:/app
6+
command: /app/bin/build.sh

0 commit comments

Comments
 (0)