Skip to content
This repository was archived by the owner on Oct 2, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
using the fast build
  • Loading branch information
asiniscalchi committed Jul 12, 2023
commit ef351d1d5790015ca508d6e3c6bf1c7d80c36495
66 changes: 66 additions & 0 deletions .github/workflows/build-publish-image-fast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build & Publish Docker Image Fast

# Controls when the action will run.
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
workflow_dispatch:

# Set an environment variable (that can be overriden) for the Docker Repo
env:
DOCKER_REPO: freeverseio/laos-ownership-node

jobs:
check:
runs-on: ubuntu-22.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v3

- name: Install linux dependencies
run: sudo apt-get install -y clang libssl-dev llvm libudev-dev protobuf-compiler

- name: Install Rust
run: |
rustup update stable --no-self-update
rustup target add wasm32-unknown-unknown
rustup component add clippy

# Caching paths to speed up builds
- name: Cache Paths
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}

- name: Check clippy
run: |
cargo clippy --all-targets --workspace --features runtime-benchmarks --features try-runtime

# Check the build
- name: Build
run: |
cargo build --release

# Login to Docker hub using the credentials stored in the repository secrets
- name: Log in to Docker Hub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

# create Docker image and push to Docker Hub
- name: Build and push Docker images
uses: docker/build-push-action@v4
with:
context: .
file: ./localbuild.Dockerfile
push: true
tags: ${{ env.DOCKER_REPO }}:${{ github.sha }}