Automated Package Update #164
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: Automated Package Update | |
| on: | |
| schedule: | |
| - cron: '0 0 * * 0' | |
| workflow_dispatch: | |
| jobs: | |
| dependencies: | |
| name: Update Dependencies | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| id: checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.REPO_PUSHER_BOT }} | |
| - name: Setup | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Tools | |
| id: tools | |
| run: dotnet tool install --global dotnet-outdated-tool | |
| - name: Update | |
| id: update | |
| run: | | |
| OUTPUT=$(dotnet outdated) | |
| if [[ $OUTPUT =~ "No outdated dependencies were detected" ]]; then | |
| echo "updated=false" >> $GITHUB_OUTPUT | |
| else | |
| dotnet outdated -u | |
| echo "updated=true" >> $GITHUB_OUTPUT | |
| fi | |
| shell: bash | |
| - name: Test | |
| id: test | |
| if: ${{ steps.update.outputs.updated == 'true' }} | |
| run: dotnet test -c Release -v minimal | |
| - name: Push changes to GitHub | |
| if: ${{ steps.update.outputs.updated == 'true' }} | |
| run: | | |
| git config --local user.email "${{ secrets.GIT_EMAIL }}" | |
| git config --local user.name "Stephen Shortall" | |
| git commit -a -m 'Dependency verison auto-update' | |
| git push |