From e4f44655f184289ccf82bc9cd6edd3c2bf389f14 Mon Sep 17 00:00:00 2001 From: Daniel Cazzulino Date: Fri, 7 Feb 2025 17:17:34 -0300 Subject: [PATCH] Update dotnet-file.yml --- .github/workflows/dotnet-file.yml | 77 ++----------------------------- 1 file changed, 3 insertions(+), 74 deletions(-) diff --git a/.github/workflows/dotnet-file.yml b/.github/workflows/dotnet-file.yml index 95f6228..083f24d 100644 --- a/.github/workflows/dotnet-file.yml +++ b/.github/workflows/dotnet-file.yml @@ -11,77 +11,6 @@ env: DOTNET_NOLOGO: true jobs: - sync: - runs-on: windows-latest - continue-on-error: true - steps: - - name: 🤖 defaults - uses: devlooped/actions-bot@v1 - with: - name: ${{ secrets.BOT_NAME }} - email: ${{ secrets.BOT_EMAIL }} - gh_token: ${{ secrets.GH_TOKEN }} - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: 🤘 checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - ref: main - token: ${{ env.GH_TOKEN }} - - - name: ⌛ rate - shell: pwsh - if: github.event_name != 'workflow_dispatch' - run: | - # add random sleep since we run on fixed schedule - sleep (get-random -max 60) - # get currently authenticated user rate limit info - $rate = gh api rate_limit | convertfrom-json | select -expandproperty rate - # if we don't have at least 100 requests left, wait until reset - if ($rate.remaining -lt 10) { - $wait = ($rate.reset - (Get-Date (Get-Date).ToUniversalTime() -UFormat %s)) - echo "Rate limit remaining is $($rate.remaining), waiting for $($wait / 1000) seconds to reset" - sleep $wait - $rate = gh api rate_limit | convertfrom-json | select -expandproperty rate - echo "Rate limit has reset to $($rate.remaining) requests" - } - - - name: 🔄 sync - shell: pwsh - run: | - dotnet tool update -g dotnet-gcm - dotnet gcm store --protocol=https --host=github.com --username=$env:GITHUB_ACTOR --password=$env:GH_TOKEN - gh auth status - - dotnet tool update -g dotnet-file - dotnet file sync -c:$env:TEMP\dotnet-file.md - if (test-path $env:TEMP\dotnet-file.md) { - echo 'CHANGES<> $env:GITHUB_ENV - cat $env:TEMP\dotnet-file.md >> $env:GITHUB_ENV - echo 'EOF' >> $env:GITHUB_ENV - cat $env:TEMP\dotnet-file.md - } else { - echo 'No changelog was generated' - } - - - name: +Mᐁ includes - uses: devlooped/actions-include@v1 - with: - validate: false - - - name: ✍ pull request - uses: peter-evans/create-pull-request@v6 - with: - base: main - branch: dotnet-file-sync - delete-branch: true - labels: dependencies - author: ${{ env.BOT_AUTHOR }} - committer: ${{ env.BOT_AUTHOR }} - commit-message: ⬆️ Bump files with dotnet-file sync - - ${{ env.CHANGES }} - title: "⬆️ Bump files with dotnet-file sync" - body: ${{ env.CHANGES }} - token: ${{ env.GH_TOKEN }} + run: + uses: devlooped/oss/.github/workflows/dotnet-file-core.yml@main + secrets: inherit \ No newline at end of file