File tree Expand file tree Collapse file tree 2 files changed +103
-0
lines changed Expand file tree Collapse file tree 2 files changed +103
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Binaries
2+
3+ on :
4+ push :
5+
6+ jobs :
7+ build :
8+ name : Build Container
9+ runs-on : ubuntu-20.04
10+
11+ steps :
12+ - uses : actions/checkout@v2
13+
14+ - name : Login to GitHub Container Registry
15+ uses : docker/login-action@v1
16+ with :
17+ registry : ghcr.io
18+ username : roxedus
19+ password : ${{ secrets.GITHUB_TOKEN }}
20+
21+ - name : Set up Docker Buildx
22+ uses : docker/setup-buildx-action@v1
23+ with :
24+ install : true
25+ version : latest
26+ driver-opts : image=moby/buildkit:master
27+
28+ - name : Build and push
29+ uses : docker/build-push-action@v2
30+ with :
31+ file : ./Dockerfile
32+ load : true
33+ cache-from : ghcr.io/roxedus/pgloader:cache
34+ cache-to : ghcr.io/roxedus/pgloader:cache
35+ tags : |
36+ ghcr.io/roxedus/pgloader
37+
38+ - name : Grab binary
39+ run : |
40+ mkdir bin
41+ docker create --name pgloader ghcr.io/roxedus/pgloader
42+ docker cp pgloader:/usr/local/bin/pgloader bin/pgloader
43+
44+ - name : Push image
45+ run : |
46+ docker push ghcr.io/roxedus/pgloader
47+
48+ - uses : ncipollo/release-action@v1
49+ with :
50+ tag : " 3047c9a"
51+ artifacts : " bin/pgloader"
52+ token : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1+ FROM debian:stable-slim as builder
2+
3+ RUN apt-get update && \
4+ apt-get install -y --no-install-recommends \
5+ bzip2 \
6+ ca-certificates \
7+ curl \
8+ freetds-dev \
9+ gawk \
10+ git \
11+ libsqlite3-dev \
12+ libssl1.1 \
13+ libzip-dev \
14+ make \
15+ openssl \
16+ patch \
17+ sbcl \
18+ time \
19+ unzip \
20+ wget \
21+ cl-ironclad \
22+ cl-babel && \
23+ mkdir -p /opt/src/pgloader && \
24+ rm -rf /var/lib/apt/lists/*
25+
26+ RUN wget -O /tmp/pgloader.tar.gz -L \
27+ "https://github.com/dimitri/pgloader/archive/refs/heads/master.tar.gz" && \
28+ tar xf \
29+ /tmp/pgloader.tar.gz -C /opt/src/pgloader --strip-components=1
30+
31+ RUN mkdir -p /opt/src/pgloader/build/bin && \
32+ cd /opt/src/pgloader && \
33+ make clones save
34+
35+ FROM debian:stable-slim
36+
37+ RUN apt-get update && \
38+ apt-get install -y --no-install-recommends \
39+ curl \
40+ freetds-dev \
41+ gawk \
42+ libsqlite3-dev \
43+ libzip-dev \
44+ make \
45+ sbcl \
46+ unzip && \
47+ rm -rf /var/lib/apt/lists/*
48+
49+ COPY --from=builder /opt/src/pgloader/build/bin/pgloader /usr/local/bin
50+
51+ ENTRYPOINT [ "pgloader" ]
You can’t perform that action at this time.
0 commit comments