Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions .github/workflows/build-toc-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,22 @@ permissions:
contents: write

jobs:
check-trigger:
runs-on: ubuntu-22.04
steps:
- name: Check if trigger is workflow_dispatch
id: check_trigger
run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "::notice::Trigger is workflow_dispatch"
echo "checked=1" >> $GITHUB_OUTPUT
else
echo "::notice::Trigger is not workflow_dispatch"
fi

check-last-commit-tag:
needs: [check-trigger]
if: ${{ needs.check-trigger.outputs.checked != '1' }}
runs-on: ubuntu-22.04
outputs:
tagged: ${{ steps.check_tag.outputs.tagged }}
Expand All @@ -35,9 +50,9 @@ jobs:
fi

toc-generator:
needs: [check-last-commit-tag]
needs: [check-trigger, check-last-commit-tag]
uses: IShix-g/Unity-GitHubActions/.github/workflows/reusable-toc-generator.yaml@main
if: ${{ needs.check-last-commit-tag.outputs.tagged == '1' }}
if: ${{ needs.check-trigger.outputs.checked == '1' || needs.check-last-commit-tag.outputs.tagged == '1' }}
secrets:
BOT_APP_ID: ${{ secrets.BOT_APP_ID }}
BOT_PRIVATE_KEY: ${{ secrets.BOT_PRIVATE_KEY }}
Expand Down
Loading