Skip to content

Commit

Permalink
Merge pull request #6 from gattaca-com/bump-fiber
Browse files Browse the repository at this point in the history
Bump fiber
  • Loading branch information
gd-0 authored Jan 24, 2024
2 parents bd87a73 + 371420c commit 778b64d
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 7 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build_latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Rust

on:
push:
branches: [ main ]

env:
CARGO_TERM_COLOR: always

jobs:

build:
runs-on: self-hosted

steps:

- uses: actions/checkout@v2
with:
fetch-depth: '0'
path: ./repos/${{ secrets.REPO_NAME }}

- name: Run Dockerfile
env:
DOCKER_REG_USR: ${{ secrets.DOCKER_REG_USR }}
DOCKER_REG_PW: ${{ secrets.DOCKER_REG_PW }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
REGISTRY_URL: ${{ secrets.REGISTRY_URL }}
REPO_NAME: ${{ secrets.REPO_NAME }}
run: |
IMAGE_NAME=latest
DOCKER_BUILDKIT=1 docker build -t helix:$IMAGE_NAME --build-arg AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID --build-arg AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY -f ./repos/$REPO_NAME/Dockerfile .
DOCKER_BUILDKIT=1 docker tag helix:$IMAGE_NAME $REGISTRY_URL/helix:$IMAGE_NAME
DOCKER_BUILDKIT=1 docker login https://$REGISTRY_URL/ -u "$DOCKER_REG_USR" -p "$DOCKER_REG_PW"
DOCKER_BUILDKIT=1 docker push $REGISTRY_URL/helix:$IMAGE_NAME
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,3 @@ db-tools/

# Coverage report
lcov.info

# Config files
*.yml
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ auto_impl = "1.0.1"
thiserror = "1.0.49"

# Broadcasting
fiber = { git = "https://github.com/chainbound/fiber-rs.git", rev = "87729040183ccae0098b1b0a30fdc631e548cc9f" }
fiber = { git = "https://github.com/chainbound/fiber-rs.git", tag = "v0.5.1" }
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN wget https://github.com/mozilla/sccache/releases/download/v0.3.1/sccache-v0.

ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
ARG REPO_NAME

# Test to make sure that aws access is set correctly
RUN test -n "$AWS_ACCESS_KEY_ID" || (echo "AWS_ACCESS_KEY_ID not set" && false)
Expand All @@ -24,7 +25,7 @@ ENV SCCACHE_S3_USE_SSL=true
ADD ./repos /app/

# Set the working directory to /app
WORKDIR /app/helix
WORKDIR /app/${REPO_NAME}

RUN --mount=type=cache,target=/root/.cargo \
--mount=type=cache,target=/usr/local/cargo/registry \
Expand All @@ -36,7 +37,7 @@ RUN --mount=type=cache,target=/root/.cargo \
RUSTC_WRAPPER=/usr/local/bin/sccache cargo build -p helix-cmd --release

# Copy binary into the workdir
RUN mv /app/helix/target/release/helix-cmd /app/helix-cmd
RUN mv /app/$REPO_NAME/target/release/helix-cmd /app/helix-cmd

# our final base
FROM debian:stable-slim
Expand Down

0 comments on commit 778b64d

Please sign in to comment.