This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
Build scaffold #10
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 scaffold | |
on: | |
workflow_dispatch: | |
inputs: | |
projects: | |
description: 'Projects to generate, separated by commas' | |
required: true | |
default: 'kernel,memoria,cpu,filesystem' | |
static: | |
description: 'Static libs to generate, separated by commas' | |
required: true | |
default: 'utils' | |
branch: | |
description: 'Branch to push the generated files' | |
required: true | |
default: 'scaffold' | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Generate scaffold files | |
run: bun ./scripts/scaffold.js --projects "${{ github.event.inputs.projects }}" --staticLibs "${{ github.event.inputs.static }}" | |
- name: Push to scaffold branch | |
run: | | |
git switch --orphan ${{ github.event.inputs.branch }} | |
mv dist/{.*,*} . | |
git add . | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git commit -m "Generate tp-scaffold files" | |
git push -f origin ${{ github.event.inputs.branch }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |