Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary #2

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: ci

on:
workflow_dispatch:
pull_request:
branches:
- c4t
- dev
env:
docker_image: "c4tplatform/camino-conduit"

jobs:
build_docker:
name: Build Docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
push: false
tags: ${{ env.docker_image }}:temp
cache-from: type=gha
cache-to: type=gha,mode=max
load: true


- name: Verify image
run: |
docker run --rm ${{ env.docker_image }}:temp --version

build_binary:
name: Build Binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Cache Cargo dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
mo-c4t marked this conversation as resolved.
Show resolved Hide resolved

- name: build binary
run: |
cd src
cargo build --release
../target/release/camino-conduit --version
mo-c4t marked this conversation as resolved.
Show resolved Hide resolved
mo-c4t marked this conversation as resolved.
Show resolved Hide resolved
21 changes: 0 additions & 21 deletions .github/workflows/docker.yml

This file was deleted.

25 changes: 23 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,31 @@ jobs:
password: ${{ secrets.DOCKER_PASS }}

- name: Build and push Docker images
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ env.docker_image }}:latest
${{ env.docker_image }}:${{ github.event.release.tag_name }}
${{ env.docker_image }}:${{ github.event.release.tag_name }}
build_binary:
name: Build Binary
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: build binary
run: |
cd src
cargo build --release
../target/release/camino-conduit --version
tar -czvf camino-conduit-linux-amd64-${{ github.event.release.tag_name }}.tar.gz --directory=target/release camino-conduit
- name: upload binary
uses: softprops/action-gh-release@v2
with:
files: camino-conduit-linux-amd64-${{ github.event.release.tag_name }}.tar.gz

Loading
Loading