Skip to content

Commit

Permalink
gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
olegdayo committed Dec 1, 2024
1 parent 96256c4 commit e356600
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 11 deletions.
44 changes: 37 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:

jobs:
validator:
gateway:
runs-on: ubuntu-latest
steps:
- name: Check Out
Expand All @@ -22,19 +22,19 @@ jobs:
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3

- name: Extract Validator Metadata
- name: Extract GateWay Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKER_USERNAME }}/validator
images: ${{ secrets.DOCKER_USERNAME }}/gateway

- name: Build and Push Validator
- name: Build and Push GateWay
uses: docker/build-push-action@v6
with:
context: ./code/back/validator
file: ./code/back/validator/Dockerfile
context: ./code/back/gateway
file: ./code/back/gateway/Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/validator:${{ github.sha }}
tags: ${{ secrets.DOCKER_USERNAME }}/gateway:${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}

integrator:
Expand Down Expand Up @@ -66,3 +66,33 @@ jobs:
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/integrator:${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}

validator:
runs-on: ubuntu-latest
steps:
- name: Check Out
uses: actions/checkout@v4

- name: Log in Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3

- name: Extract Validator Metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ secrets.DOCKER_USERNAME }}/validator

- name: Build and Push Validator
uses: docker/build-push-action@v6
with:
context: ./code/back/validator
file: ./code/back/validator/Dockerfile
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/validator:${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}
9 changes: 9 additions & 0 deletions code/back/gateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM golang:alpine AS builder
WORKDIR /app
COPY . .
RUN apk add --no-cache make
RUN go build -ldflags "-s -w" -o ./bin/gateway ./code/back/gateway/cmd

FROM alpine:latest AS runner
WORKDIR /app
CMD ["./bin/gateway"]
4 changes: 0 additions & 4 deletions code/back/gateway/config.yaml

This file was deleted.

0 comments on commit e356600

Please sign in to comment.