-
-
Notifications
You must be signed in to change notification settings - Fork 2
Using STRUCT with Github Actions
This is one of the most common ways to use STRUCT in a GitHub Action workflow. It allows you to automate the generation of project structures based on your .struct.yaml
configuration file.
name: run-struct
on:
workflow_dispatch:
jobs:
generate:
uses: httpdss/struct/.github/workflows/struct-generate.yaml@main
with:
struct_file: 'file://.struct.yaml'
output_dir: '.'
pr_base: 'master'
custom_structure_repository: 'httpdss/custom-structures'
secrets:
token: ${{ secrets.STRUCT_RUN_TOKEN }}
This workflow will trigger on manual dispatch and run the STRUCT generation job using the specified .struct.yaml
file and output directory. It also allows you to specify a base branch for pull requests
As you can see, it uses custom_structure_repository
to specify a custom repository for structures. This checks out the repository and uses the structures defined in it. By default, STRUCT will look for structures in the structures
directory of the repository but you can change this by setting custom_structure_path
to the path where your custom structures are located.