Skip to content
This repository has been archived by the owner on Mar 10, 2022. It is now read-only.

Commit

Permalink
Adding workflows, dockerfile and submodule.
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotcourant committed Jun 5, 2021
1 parent 0de5d74 commit 68346a4
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build

on:
push:
branches:
- '!main'
pull_request: { }

jobs:
docker:
name: Docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Build
uses: docker/build-push-action@v1
with:
registry: containers.monetr.dev
repository: twemproxy
push: false
35 changes: 35 additions & 0 deletions .github/workflows/docker-push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish

on:
push:
branches:
- main

jobs:
docker:
name: Docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Generate Tag
id: tag
run: |
echo ::set-output name=POST_TAG::$(date +%Y.%m.%d)
- name: Build and push containers.monetr.dev
uses: docker/build-push-action@v1
with:
registry: containers.monetr.dev
username: ${{ secrets.containers_push_username }}
password: ${{ secrets.containers_push_password }}
tags: latest,${{ steps.tag.outputs.POST_TAG }}
repository: twemproxy
- name: Build and push ghcr.io
uses: docker/build-push-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
tags: latest,${{ steps.tag.outputs.POST_TAG }}
repository: monetr/twemproxy
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "twemproxy"]
path = twemproxy
url = https://github.com/twitter/twemproxy.git
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM gcc:9.4.0

COPY ./twemproxy /usr/src/twemproxy
WORKDIR /usr/src/twemproxy
RUN \
autoreconf -h && \
autoreconf -fvi && \
./configure && \
make && \
make install

FROM debian:bullseye

COPY --from=builder /usr/local/sbin/nutcracker /bin/nutcracker

ENTRYPOINT [ "nutcracker" ]
1 change: 1 addition & 0 deletions twemproxy
Submodule twemproxy added at 1fde0f

0 comments on commit 68346a4

Please sign in to comment.