update build #11
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 Template | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 18 * * 5' | ||
push: | ||
branches: [ '*' ] | ||
paths-ignore: | ||
- "**/docs/**" | ||
- "**.md" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
PROJECT_NAME: server-template | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: my_workspace/server | ||
- name: Setup Workspace Directory | ||
run: | | ||
echo '[workspace]' >> my_workspace/Cargo.toml | ||
echo 'resolver = "2"' >> my_workspace/Cargo.toml | ||
echo 'members = ["server", "services/auth"]' >> my_workspace/Cargo.toml | ||
echo 'exclude = ["templates"]' >> my_workspace/Cargo.toml | ||
mkdir -p my_workspace/templates | ||
mkdir -p my_workspace/services/auth | ||
- name: Clone Auth Service Template | ||
run: | | ||
git clone https://github.com/codeitlikemiley/service_template my_workspace/templates/auth | ||
- name: Generate Auth Service from Local Template | ||
uses: cargo-generate/cargo-generate-action@v0.18.5 | ||
with: | ||
name: auth | ||
template: ./templates/auth | ||
arguments: "--branch main --define service_description=default --define rpc_method=make" | ||
working-directory: my_workspace | ||
Check failure on line 41 in .github/workflows/build.yml GitHub Actions / Build TemplateInvalid workflow file
|
||
- name: Generate Server | ||
uses: cargo-generate/cargo-generate-action@v0.18.5 | ||
with: | ||
name: ${{ env.PROJECT_NAME }} | ||
arguments: "--branch main --define server_name=default --define service_name=auth" | ||
working-directory: my_workspace | ||
- name: Build Workspace | ||
run: | | ||
cd my_workspace | ||
cargo check --all |