Skip to content

Commit

Permalink
Updating CI release builds (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
plauche authored May 4, 2023
1 parent db7377e commit 5f45048
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 15 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,17 @@ jobs:
run: cargo clean
- name: cargo/cross build
run: CROSS_CONFIG=Cross.toml cross build --bin ${{ matrix.project }} --target ${{ matrix.target }} --release
- name: Archive binary
run: tar -czvf ${{ matrix.project }}-${{ matrix.target }}.tar.gz -C ./target/${{ matrix.target }}/release ${{ matrix.project }}
- name: upload binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ needs.start_release.outputs.upload_url }}
asset_path: ./target/${{ matrix.target }}/release/${{ matrix.project }}
asset_name: ${{ matrix.project }}-${{ matrix.target }}
asset_content_type: application
asset_path: ./${{ matrix.project }}-${{ matrix.target }}.tar.gz
asset_name: ${{ matrix.project }}-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
asset_content_type: application/gzip

build_upload_docker:
needs: [start_release]
Expand All @@ -72,4 +74,5 @@ jobs:
- name: Build and publish myceli docker
run: |
docker build -f myceli.Dockerfile . --tag ghcr.io/ipfs-shipyard/myceli:latest --tag ghcr.io/ipfs-shipyard/myceli:${{ github.ref_name }}
docker push ghcr.io/ipfs-shipyard/myceli:latest ghcr.io/ipfs-shipyard/myceli:${{ github.ref_name }}
docker push ghcr.io/ipfs-shipyard/myceli:latest
docker push ghcr.io/ipfs-shipyard/myceli:${{ github.ref_name }}
8 changes: 4 additions & 4 deletions cross-aarch64-linux.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:latest
FROM ghcr.io/cross-rs/aarch64-unknown-linux-gnu:0.2.5

RUN apt-get update && \
apt-get install -y unzip
RUN dpkg --add-architecture arm64 && apt-get update && \
apt-get install -y unzip libssl-dev:arm64

RUN curl -Lo protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip"
RUN curl -Lo protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v22.2/protoc-22.2-linux-x86_64.zip"
RUN unzip -q protoc.zip -d /usr/local
RUN chmod a+x /usr/local/bin/protoc
ENV PROTOC=/usr/local/bin/protoc
8 changes: 4 additions & 4 deletions cross-armv7-linux.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ghcr.io/cross-rs/armv7-unknown-linux-gnueabihf:latest
FROM ghcr.io/cross-rs/armv7-unknown-linux-gnueabihf:0.2.5

RUN apt-get update && \
apt-get install -y unzip
RUN dpkg --add-architecture armhf && apt-get update && \
apt-get install -y unzip openssl libssl-dev:armhf

RUN curl -Lo protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip"
RUN curl -Lo protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v22.2/protoc-22.2-linux-x86_64.zip"
RUN unzip -q protoc.zip -d /usr/local
RUN chmod a+x /usr/local/bin/protoc
ENV PROTOC=/usr/local/bin/protoc
4 changes: 2 additions & 2 deletions cross-x86-linux.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM ghcr.io/cross-rs/x86_64-unknown-linux-gnu:latest

RUN apt-get update && \
apt-get install -y unzip
apt-get install -y unzip libssl-dev

RUN curl -Lo protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip"
RUN curl -Lo protoc.zip "https://github.com/protocolbuffers/protobuf/releases/download/v22.2/protoc-22.2-linux-x86_64.zip"
RUN unzip -q protoc.zip -d /usr/local
RUN chmod a+x /usr/local/bin/protoc
ENV PROTOC=/usr/local/bin/protoc
1 change: 0 additions & 1 deletion myceli.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ RUN cp ./target/debug/myceli /usr/bin/myceli
# Extras stage
FROM debian:bullseye-slim
LABEL org.opencontainers.image.source="https://github.com/ipfs-shipyard/space"
RUN apt update && apt -y install --no-install-recommends iproute2
COPY --from=builder /usr/bin/myceli /usr/bin/myceli
COPY --from=builder Cargo.toml /usr/local/Cargo.toml
ENTRYPOINT myceli $CONFIG_PATH

0 comments on commit 5f45048

Please sign in to comment.