Skip to content

Commit

Permalink
feat(ci): add support for building and pushing envoy docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
ozeliurs committed Oct 7, 2024
1 parent 5b95242 commit ef5f44a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/docker-build-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- "build-base/**"
- "api/**"
- "solver/**"
- "envoy/**"
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -74,3 +75,32 @@ jobs:
push: true
tags: ghcr.io/${{ env.REPO_LOWERCASE }}/grpc-server:latest
platforms: linux/amd64,linux/arm64

build-and-push-envoy:
if: github.event_name == 'workflow_dispatch' || contains(github.event.push.paths, 'envoy/'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set lowercase repository name
run: echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push envoy image
uses: docker/build-push-action@v2
with:
context: ./envoy
file: ./envoy/Dockerfile
push: true
tags: ghcr.io/${{ env.REPO_LOWERCASE }}/envoy:latest
platforms: linux/amd64,linux/arm64
2 changes: 2 additions & 0 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ FROM ghcr.io/startupnationlabs/eternity2/base:latest as builder
# Copy
WORKDIR /app
COPY . .

RUN rm -rf vcpkg.json

# Build
RUN cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake
RUN cmake --build build
Expand Down

0 comments on commit ef5f44a

Please sign in to comment.