Build Service Template #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/cargo-generate-action@v0.18.5 | |
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 |