Update Github Models #34
This file contains hidden or 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: Update Github Models | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '0 5 * * *' # Daily at 05:00 UTC | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| generate-and-pr: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.repository_owner == 'dotnet' }} | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Generate updated Github model descriptors | |
| working-directory: src/Aspire.Hosting.GitHub.Models/tools | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: | | |
| set -e | |
| "$GITHUB_WORKSPACE/dotnet.sh" run GenModel.cs | |
| - name: Create or update pull request | |
| uses: dotnet/actions-create-pull-request@e8d799aa1f8b17f324f9513832811b0a62f1e0b1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: update-github-models | |
| base: main | |
| commit-message: "[Automated] Update Github Models" | |
| labels: | | |
| area-integrations | |
| area-engineering-systems | |
| title: "[Automated] Update Github Models" | |
| body: "Auto-generated update of Github model descriptors (GithubModel.Generated.cs)." |