Skip to content

Commit 71ed79f

Browse files
committed
publish
1 parent 228ba4d commit 71ed79f

File tree

8 files changed

+51
-10
lines changed

8 files changed

+51
-10
lines changed

.github/workflows/publish.yaml

+33-2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,36 @@ jobs:
6767
tags: ${{ secrets.DOCKER_USERNAME }}/integrator:${{ github.sha }}
6868
labels: ${{ steps.meta.outputs.labels }}
6969

70+
pingus:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: Check Out
74+
uses: actions/checkout@v4
75+
76+
- name: Log in Docker Hub
77+
uses: docker/login-action@v3
78+
with:
79+
username: ${{ secrets.DOCKER_USERNAME }}
80+
password: ${{ secrets.DOCKER_TOKEN }}
81+
82+
- name: Set up Docker BuildX
83+
uses: docker/setup-buildx-action@v3
84+
85+
- name: Extract Pingus Metadata
86+
id: meta
87+
uses: docker/metadata-action@v5
88+
with:
89+
images: ${{ secrets.DOCKER_USERNAME }}/pingus
90+
91+
- name: Build and Push Pingus
92+
uses: docker/build-push-action@v6
93+
with:
94+
context: ./code/back/pingus
95+
file: ./code/back/pingus/Dockerfile
96+
push: true
97+
tags: ${{ secrets.DOCKER_USERNAME }}/pingus:${{ github.sha }}
98+
labels: ${{ steps.meta.outputs.labels }}
99+
70100
validator:
71101
runs-on: ubuntu-latest
72102
steps:
@@ -112,13 +142,13 @@ jobs:
112142
- name: Set up Docker BuildX
113143
uses: docker/setup-buildx-action@v3
114144

115-
- name: Extract WebApp Metadata
145+
- name: Extract Web-App Metadata
116146
id: meta
117147
uses: docker/metadata-action@v5
118148
with:
119149
images: ${{ secrets.DOCKER_USERNAME }}/web-app
120150

121-
- name: Build and Push WebApp
151+
- name: Build and Push Web-App
122152
uses: docker/build-push-action@v6
123153
with:
124154
context: ./code/front/web-app
@@ -132,6 +162,7 @@ jobs:
132162
needs:
133163
- gateway
134164
- integrator
165+
- pingus
135166
- validator
136167
- web-app
137168
steps:
File renamed without changes.

code/back/validator/Cargo.toml renamed to code/back/pingus/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "validator"
2+
name = "pingus"
33
version = "0.1.0"
44
edition = "2021"
55

code/back/pingus/Dockerfile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM rust:latest AS builder
2+
WORKDIR /app
3+
COPY . .
4+
RUN apt update && apt install musl-tools -y
5+
RUN rustup target add x86_64-unknown-linux-musl
6+
RUN cargo build --release --target x86_64-unknown-linux-musl
7+
8+
FROM --platform=linux/amd64 alpine:latest AS runner
9+
WORKDIR /app
10+
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/pingus .
11+
CMD ["./pingus"]
File renamed without changes.
File renamed without changes.

code/back/validator/Dockerfile

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
FROM rust:latest AS builder
1+
FROM golang:alpine AS builder
22
WORKDIR /app
33
COPY . .
4-
RUN apt update && apt install musl-tools -y
5-
RUN rustup target add x86_64-unknown-linux-musl
6-
RUN cargo build --release --target x86_64-unknown-linux-musl
4+
RUN apk add --no-cache make
5+
RUN go build -ldflags "-s -w" -o ./bin/integrator ./cmd
76

8-
FROM --platform=linux/amd64 alpine:latest AS runner
7+
FROM alpine:latest AS runner
98
WORKDIR /app
10-
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/validator .
11-
CMD ["./validator"]
9+
COPY --from=builder /app/bin/integrator .
10+
CMD ["./integrator"]

0 commit comments

Comments
 (0)