diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml new file mode 100644 index 0000000..66d412d --- /dev/null +++ b/.github/workflows/dotnet-desktop.yml @@ -0,0 +1,46 @@ +name: Update dependencies + +on: + workflow_dispatch: + schedule: + - cron: "30 1 1,15 * *" # Every two weeks + +jobs: + updatePackages: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install .NET Core + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.x.x + + - name: Install dotnet-outdated + run: dotnet tool install --global dotnet-outdated-tool + + - name: Update packages + run: dotnet outdated CleanArchitecture.sln -u + + - name: Commit and push changes + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + git add . + git commit -m "Update packages" + git push + + - name: Get current date + id: date + run: echo "::set-output name=date::$(date +'%d_%m_%Y')" + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: "update/${{ steps.date.outputs.date }}" + title: Automatic Package Update + body: | + This pull request includes updates to the packages in the solution.