diff --git a/.github/workflows/struct-generate.yaml b/.github/workflows/struct-generate.yaml index ec5f5d0..f32f98c 100644 --- a/.github/workflows/struct-generate.yaml +++ b/.github/workflows/struct-generate.yaml @@ -6,12 +6,12 @@ on: struct_file: description: 'Path to the STRUCT file' type: string - required: true - default: '.struct.yaml' + required: false + default: 'file://.struct.yaml' output_dir: description: 'Path to the output directory' type: string - required: true + required: false default: '.' args: description: 'Additional arguments to pass to STRUCT' @@ -85,6 +85,8 @@ jobs: fetch-depth: 1 - name: Run STRUCT + env: + GITHUB_TOKEN: ${{ secrets.token }} run: | if [ -d ./custom-structures ]; then @@ -107,6 +109,12 @@ jobs: ${{ inputs.output_dir }} fi + - name: Remove custom-structures before PR generation + run: | + if [ -d ./custom-structures ]; then + rm -rf ./custom-structures + fi + - name: Generate PR with changes if: github.event_name == 'workflow_dispatch' uses: peter-evans/create-pull-request@v7