File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Main
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ jobs :
9+ build :
10+ name : Build
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout code
15+ uses : actions/checkout@v4
16+
17+ - name : Extract version from tag
18+ id : get_version
19+ run : echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
20+
21+ - name : Login to Docker Hub
22+ uses : docker/login-action@v3
23+ with :
24+ username : ${{ secrets.DOCKERHUB_USERNAME }}
25+ password : ${{ secrets.DOCKERHUB_TOKEN }}
26+
27+ - name : Set up Docker Buildx
28+ uses : docker/setup-buildx-action@v3
29+ with :
30+ install : true
31+
32+ - name : Create Docker Buildx builder
33+ run : docker buildx create --use --name mybuilder
34+
35+ - name : Build and push image
36+ uses : docker/build-push-action@v5
37+ with :
38+ context : .
39+ push : true
40+ tags : |
41+ ${{ secrets.DOCKERHUB_USERNAME }}/whois:latest
42+ ${{ secrets.DOCKERHUB_USERNAME }}/whois:${{ env.VERSION }}
43+ platforms : linux/amd64
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ FROM golang:alpine AS build
44
55WORKDIR /ws
66
7- COPY obmp-whois/ /ws
7+ COPY . /ws
88
99ENV GO111MODULE=on
1010ENV GCGO_ENABLED=0
@@ -15,26 +15,26 @@ RUN apk add --no-cache bash git
1515RUN cd /ws && go mod tidy
1616
1717# Build the app
18- RUN cd /ws && go build -o obmp- whoisd .
18+ RUN cd /ws && go build -o whoisd .
1919
2020FROM alpine
2121
22- COPY --from=build /ws/obmp- whoisd /usr/local/bin/
22+ COPY --from=build /ws/whoisd /usr/local/bin/
2323
2424WORKDIR /tmp
2525
2626# Environment defaults
2727ENV DB_MAX_THREADS=10
2828ENV WHOIS_PORT=43
2929
30- ENV PGHOST=obmp-psql
31- ENV PGDATABASE=openbmp
32- ENV PGUSER=openbmp
33- ENV PGPASSWORD=openbmp
30+ ENV PGHOST=aggregator
31+ ENV PGDATABASE=bgpdata
32+ ENV PGUSER=bgpdata
33+ ENV PGPASSWORD=bgpdata
3434ENV PGPORT=5432
3535
3636EXPOSE 43
3737
3838RUN apk add --no-cache bash
3939
40- ENTRYPOINT /usr/local/bin/obmp- whoisd --logfile /dev/stdout -p $WHOIS_PORT -t $DB_MAX_THREADS
40+ ENTRYPOINT /usr/local/bin/whoisd --logfile /dev/stdout -p $WHOIS_PORT -t $DB_MAX_THREADS
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ package cmd
44import (
55 "fmt"
66 homedir "github.com/mitchellh/go-homedir"
7- "github.com/openbmp/obmp- whois/config"
8- whois "github.com/openbmp/obmp- whois/pkg/whois"
7+ "github.com/bgpdata/ whois/config"
8+ whois "github.com/obgpdata/ whois/pkg/whois"
99 log "github.com/sirupsen/logrus"
1010 "github.com/spf13/cobra"
1111 "github.com/spf13/viper"
Original file line number Diff line number Diff line change 1- module github.com/openbmp/obmp- whois
1+ module github.com/bgpdata/ whois
22
33go 1.17
44
Original file line number Diff line number Diff line change 22package main
33
44import (
5- "github.com/openbmp/obmp- whois/cmd"
5+ "github.com/bgpdata/ whois/cmd"
66)
77
88func main () {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ package whois
44import (
55 "database/sql"
66 "fmt"
7- "github.com/openbmp/obmp- whois/config"
7+ "github.com/bgpdata/ whois/config"
88 log "github.com/sirupsen/logrus"
99 "strings"
1010 "time"
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ package whois
44import (
55 "bufio"
66 "database/sql"
7- "github.com/openbmp/obmp- whois/config"
7+ "github.com/bgpdata/ whois/config"
88 log "github.com/sirupsen/logrus"
99 "net"
1010 "os"
You can’t perform that action at this time.
0 commit comments