-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from cole-miller/docker-publish
Add Dockerfile and GHCR publish workflow
- Loading branch information
Showing
4 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Publish container image to GHCR | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
paths: | ||
- 'image-version' | ||
- 'Dockerfile' | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: GHCR login | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: 'ghcr.io' | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build | ||
run: | | ||
version=$(cat image-version) | ||
docker build -t ghcr.io/canonical/jepsen-dqlite-unofficial:$version . | ||
- name: Push | ||
run: | | ||
version=$(cat image-version) | ||
docker push ghcr.io/canonical/jepsen-dqlite-unofficial:$version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM ubuntu:jammy | ||
|
||
ARG GO_VERSION=1.21.0 | ||
|
||
RUN apt-get update | ||
RUN apt-get install --yes --no-install-recommends \ | ||
automake \ | ||
build-essential \ | ||
curl \ | ||
git \ | ||
gnuplot-nox \ | ||
graphviz \ | ||
iproute2 \ | ||
iptables \ | ||
leiningen \ | ||
libjna-java \ | ||
liblz4-dev \ | ||
libsqlite3-dev \ | ||
libtool \ | ||
libuv1-dev \ | ||
pkg-config \ | ||
sudo | ||
|
||
WORKDIR /root | ||
RUN git clone --depth 1 https://github.com/ianlancetaylor/libbacktrace | ||
|
||
WORKDIR /root/libbacktrace | ||
RUN autoreconf -i | ||
RUN ./configure | ||
RUN make install | ||
|
||
WORKDIR /root | ||
RUN rm -rf libbacktrace | ||
RUN curl -L -o go.tar.gz https://go.dev/dl/go$GO_VERSION.linux-amd64.tar.gz | ||
RUN tar xzf go.tar.gz | ||
RUN mv go /usr/local | ||
RUN rm -f go.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.0.1 |