Skip to content

Build Service Template #23

Build Service Template

Build Service Template #23

Workflow file for this run

name: Build Service Template
on:
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_dispatch
workflow_dispatch:
schedule:
- cron: '0 18 * * 5'
push:
branches: [ '*' ]
paths-ignore:
- "**/docs/**"
- "**.md"
jobs:
build:
runs-on: ubuntu-latest
env:
PROJECT_NAME: service-template
steps:
- uses: actions/checkout@v4
- name: Install Protoc
uses: arduino/setup-protoc@v2
- uses: cargo-generate/[email protected]
with:
name: ${{ env.PROJECT_NAME }}
arguments: "--branch main --define service_description=default --define rpc_method=make"
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
# we need to move the generated project to a temp folder, away from the template project
# otherwise `cargo` runs would fail
# see https://github.com/rust-lang/cargo/issues/9922
- run: |
mv $PROJECT_NAME ${{ runner.temp }}/
cd ${{ runner.temp }}/$PROJECT_NAME
cargo check