diff --git a/.github/actions/dotnet/action.yml b/.github/actions/dotnet/action.yml deleted file mode 100644 index c876ae3..0000000 --- a/.github/actions/dotnet/action.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: ⚙ dotnet -description: Configures dotnet if the repo/org defines the DOTNET custom property - -runs: - using: composite - steps: - - name: 🔎 dotnet - id: dotnet - shell: bash - run: | - VERSIONS=$(gh api repos/${{ github.repository }}/properties/values | jq -r '.[] | select(.property_name == "DOTNET") | .value') - # Remove extra whitespace from VERSIONS - VERSIONS=$(echo "$VERSIONS" | tr -s ' ' | tr -d ' ') - # Convert comma-separated to newline-separated - NEWLINE_VERSIONS=$(echo "$VERSIONS" | tr ',' '\n') - # Validate versions - while IFS= read -r version; do - if ! [[ $version =~ ^[0-9]+(\.[0-9]+(\.[0-9]+)?)?(\.x)?$ ]]; then - echo "Error: Invalid version format: $version" - exit 1 - fi - done <<< "$NEWLINE_VERSIONS" - # Write multiline output to $GITHUB_OUTPUT - { - echo 'versions<> $GITHUB_OUTPUT - - - name: ⚙ dotnet - if: steps.dotnet.outputs.versions != '' - uses: actions/setup-dotnet@v4 - with: - dotnet-version: | - ${{ steps.dotnet.outputs.versions }} diff --git a/.github/workflows/dotnet-file-core.yml b/.github/workflows/dotnet-file-core.yml deleted file mode 100644 index 824f52c..0000000 --- a/.github/workflows/dotnet-file-core.yml +++ /dev/null @@ -1,95 +0,0 @@ -# Synchronizes .netconfig-configured files with dotnet-file -name: dotnet-file-core -on: - workflow_call: - secrets: - BOT_NAME: - required: false - BOT_EMAIL: - required: false - GH_TOKEN: - required: false - -env: - DOTNET_NOLOGO: true - -defaults: - run: - shell: pwsh - -jobs: - sync: - runs-on: ubuntu-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 - 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 - run: | - dotnet tool update -g dotnet-gcm - # store credentials in plaintext for linux compat - git config --local credential.credentialStore plaintext - 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 - $changelog = "$([System.IO.Path]::GetTempPath())dotnet-file.md" - dotnet file sync -c:$changelog - if (test-path $changelog) { - echo 'CHANGES<> $env:GITHUB_ENV - cat $changelog >> $env:GITHUB_ENV - echo 'EOF' >> $env:GITHUB_ENV - cat $changelog - } else { - echo 'No changelog was generated' - } - - - name: +Mᐁ includes - uses: devlooped/actions-includes@v1 - with: - validate: false - - - name: ✍ pull request - uses: peter-evans/create-pull-request@v8 - 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 }} diff --git a/.netconfig b/.netconfig index 24e1f68..438a76d 100644 --- a/.netconfig +++ b/.netconfig @@ -142,3 +142,17 @@ sha = 666a2a7c315f72199c418f11482a950fc69a8901 etag = 91ea15c07bfd784036c6ca931f5b2df7e9767b8367146d96c79caef09d63899f weak +[file ".github/actions/dotnet/action.yml"] + url = https://github.com/devlooped/oss/blob/main/.github/actions/dotnet/action.yml + skip +[file ".github/workflows/dotnet-env.yml"] + url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-env.yml + sha = 77e83f238196d2723640abef0c7b6f43994f9747 + etag = fcb9759a96966df40dcd24906fd328ddec05953b7e747a6bb8d0d1e4c3865274 + weak +[file ".github/workflows/dotnet-file-core.yml"] + url = https://github.com/devlooped/oss/blob/main/.github/workflows/dotnet-file-core.yml + skip +[file "src/nuget.config"] + url = https://github.com/devlooped/oss/blob/main/src/nuget.config + skip diff --git a/src/nuget.config b/src/nuget.config deleted file mode 100644 index 1c18c96..0000000 --- a/src/nuget.config +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -