Rename settle-bot to settler, fix build (#492)

* Fix settler build, rename due to heroku not liking '-'

* Temporarily remove ref tag

* Remove temporary branch trigger
This commit is contained in:
riordanp 2023-03-14 18:10:24 +00:00 committed by GitHub
parent 00e467b2c0
commit fc1341f731
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 10 additions and 13 deletions

View File

@ -10,7 +10,7 @@ on:
'lib/client/**',
'bin/keeper/**',
'bin/liquidator/**',
'bin/settle-bot/**',
'bin/settler/**',
]
workflow_call:
secrets:
@ -65,7 +65,6 @@ jobs:
push: true
tags: |
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}:${{ github.sha }}
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}:${{ github.ref_name }}
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
@ -78,19 +77,17 @@ jobs:
push: true
tags: |
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}-liquidator:${{ github.sha }}
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}-liquidator:${{ github.ref_name }}
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}-liquidator:latest
# Build and push the settle-bot runtime image
# Build and push the settler runtime image
- name: Build and Push Settle Bot
uses: docker/build-push-action@v2
with:
file: bin/settle-bot/Dockerfile.settle-bot
file: bin/settler/Dockerfile.settler
context: .
push: true
tags: |
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}-settle-bot:${{ github.sha }}
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}-settle-bot:${{ github.ref_name }}
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}-settle-bot:latest
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}-settler:${{ github.sha }}
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}-settler:latest
# Build and push the keeper runtime image
- name: Build and Push Keeper
uses: docker/build-push-action@v2
@ -100,5 +97,4 @@ jobs:
push: true
tags: |
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}-keeper:${{ github.sha }}
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}-keeper:${{ github.ref_name }}
us-docker.pkg.dev/${{ env.PROJECT_ID }}/gcr.io/${{ env.IMAGE }}-keeper:latest

View File

@ -20,11 +20,12 @@ COPY --from=plan /app/recipe-*.json .
COPY . .
# RUN cargo chef cook --release --recipe-path recipe-keeper.json --bin keeper
# RUN cargo chef cook --release --recipe-path recipe-liquidator.json --bin liquidator
RUN cargo build --release --bin keeper --bin liquidator
RUN cargo build --release --bin keeper --bin liquidator --bin settler
FROM debian:bullseye-slim as run
RUN apt-get update && apt-get -y install ca-certificates libc6
COPY --from=build /app/target/release/keeper /usr/local/bin/
COPY --from=build /app/target/release/liquidator /usr/local/bin/
COPY --from=build /app/target/release/settler /usr/local/bin/
RUN adduser --system --group --no-create-home mangouser
USER mangouser

View File

@ -1,10 +1,10 @@
[package]
name = "mango-v4-settle-bot"
name = "mango-v4-settler"
version = "0.0.1"
edition = "2021"
[[bin]]
name = "settle-bot"
name = "settler"
path = "src/main.rs"
[dependencies]

View File

@ -4,4 +4,4 @@
ARG BASE_TAG=latest
FROM us-docker.pkg.dev/mango-markets/gcr.io/mango-v4:$BASE_TAG
USER mangouser
CMD ["liquidator"]
CMD ["settler"]