-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# devlooped/oss - Switch back to latest stable includes devlooped/oss@875284b - Update nuget.config with new(ish?) MS certs devlooped/oss@032439d - Upgrade to supported artifact actions devlooped/oss@64141f1 - Ensure .NET9 SDK for --allow-downgrade switch on ubuntu devlooped/oss@cdeecc2 - Make sure all stable versions are available for build/test devlooped/oss@06e898c - Attempt to get necessary permissions for default token devlooped/oss@85829f2 - Update dotnet-file.yml to latest pr action devlooped/oss@42704be - Switch to reusable workflow for dotnet-file devlooped/oss@f2e52f7 - Rename sync to run devlooped/oss@9d58f5c - Point to main for dotnet-file sync workflow devlooped/oss@59aaf43
- Loading branch information
1 parent
e9b413c
commit 27f669f
Showing
8 changed files
with
151 additions
and
86 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Synchronizes .netconfig-configured files with dotnet-file | ||
name: dotnet-file-core | ||
on: | ||
workflow_call: | ||
|
||
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<<EOF' >> $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@v7 | ||
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 }} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<config> | ||
<add key="signatureValidationMode" value="accept" /> | ||
</config> | ||
<trustedSigners> | ||
<author name="Microsoft"> | ||
<certificate fingerprint="3F9001EA83C560D712C24CF213C3D312CB3BFF51EE89435D3430BD06B5D0EECE" hashAlgorithm="SHA256" allowUntrustedRoot="true" /> | ||
<certificate fingerprint="AA12DA22A49BCE7D5C1AE64CC1F3D892F150DA76140F210ABD2CBFFCA2C18A27" hashAlgorithm="SHA256" allowUntrustedRoot="true" /> | ||
<certificate fingerprint="566A31882BE208BE4422F7CFD66ED09F5D4524A5994F50CCC8B05EC0528C1353" hashAlgorithm="SHA256" allowUntrustedRoot="true" /> | ||
<certificate fingerprint="1F4B311D9ACC115C8DC8018B5A49E00FCE6DA8E2855F9F014CA6F34570BC482D" hashAlgorithm="SHA256" allowUntrustedRoot="true" /> | ||
</author> | ||
<repository name="nuget.org" serviceIndex="https://api.nuget.org/v3/index.json"> | ||
<certificate fingerprint="0E5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D" hashAlgorithm="SHA256" allowUntrustedRoot="true" /> | ||
<certificate fingerprint="5A2901D6ADA3D18260B9C6DFE2133C95D74B9EEF6AE0E5DC334C8454D1477DF4" hashAlgorithm="SHA256" allowUntrustedRoot="true" /> | ||
<certificate fingerprint="CF7AC17AD047ECD5FDC36822031B12D4EF078B6F2B4C5E6BA41F8FF2CF4BAD67" hashAlgorithm="SHA256" allowUntrustedRoot="true" /> | ||
<certificate fingerprint="C474CE76007D02394E0DA5E4DE7C14C680F9E282013CFEF653EF5DB71FDF61F8" hashAlgorithm="SHA256" allowUntrustedRoot="true" /> | ||
<certificate fingerprint="1F4B311D9ACC115C8DC8018B5A49E00FCE6DA8E2855F9F014CA6F34570BC482D" hashAlgorithm="SHA256" allowUntrustedRoot="true" /> | ||
</repository> | ||
</trustedSigners> | ||
</configuration> |