Skip to content

Commit

Permalink
Merge pull request #34 from filecoin-project/fix-deploy-workflow
Browse files Browse the repository at this point in the history
Fix deploy workflow
  • Loading branch information
jbesraa authored Oct 5, 2023
2 parents 5c04084 + f9dcb5f commit 6b757e5
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 32 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
tags:
- '*'


jobs:
deploy_image:
runs-on: ubuntu-latest
Expand All @@ -30,7 +31,7 @@ jobs:
- name: Build and tag Docker image
run: |
echo "Building Docker image..."
docker build -f http-server/Dockerfile -t "public.ecr.aws/b3c4u5n1/filecoin-core-api:${{ github.ref_name }}" http-server
docker build -t "public.ecr.aws/b3c4u5n1/filecoin-core-api:${{ github.ref_name }}" .
- name: Push Docker image to ECR
run: |
Expand Down
8 changes: 6 additions & 2 deletions http-server/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
FROM rust:1.71 AS builder
COPY Cargo.toml Cargo.lock gh-private-key.pem ./
COPY ./src ./src
COPY ./http-server ./http-server
COPY ./database ./database
COPY ./lib ./lib
COPY ./fplus ./fplus

RUN cargo build --release

FROM debian:bullseye

# Needed for openssl(hyper uses it)
RUN apt-get update && apt-get install -y libssl-dev ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder ./target/release/http-server ./target/release/http-server
CMD ["/target/release/http-server"]
CMD ["/target/release/http-server"]
File renamed without changes.
28 changes: 0 additions & 28 deletions lib/gh-private-key.pem

This file was deleted.

2 changes: 1 addition & 1 deletion lib/src/external_services/github.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ impl GithubWrapper<'static> {
.pool_idle_timeout(std::time::Duration::from_secs(15))
.build(connector);
let key =
jsonwebtoken::EncodingKey::from_rsa_pem(include_bytes!("../../gh-private-key.pem"))
jsonwebtoken::EncodingKey::from_rsa_pem(include_bytes!("../../../gh-private-key.pem"))
.unwrap();
let octocrab = OctocrabBuilder::new_empty()
.with_service(client)
Expand Down

0 comments on commit 6b757e5

Please sign in to comment.