From 191378a1402930e9b8bb95d6241d4c3e5866b87d Mon Sep 17 00:00:00 2001 From: Dan Jagnow Date: Mon, 18 Jan 2021 08:29:05 -0600 Subject: [PATCH] Added retries to SetCloudBuildVariable for GitHubActions Updated the GitHubActions class to adopt retries in the SetCloudBuildVariable method. --- src/NerdBank.GitVersioning/CloudBuildServices/GitHubActions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NerdBank.GitVersioning/CloudBuildServices/GitHubActions.cs b/src/NerdBank.GitVersioning/CloudBuildServices/GitHubActions.cs index 85adfffe..48ca3bbf 100644 --- a/src/NerdBank.GitVersioning/CloudBuildServices/GitHubActions.cs +++ b/src/NerdBank.GitVersioning/CloudBuildServices/GitHubActions.cs @@ -28,7 +28,7 @@ internal class GitHubActions : ICloudBuild public IReadOnlyDictionary SetCloudBuildVariable(string name, string value, TextWriter stdout, TextWriter stderr) { - File.AppendAllText(EnvironmentFile, $"{Environment.NewLine}{name}={value}{Environment.NewLine}"); + Utilities.FileOperationWithRetry(() => File.AppendAllText(EnvironmentFile, $"{Environment.NewLine}{name}={value}{Environment.NewLine}")); return GetDictionaryFor(name, value); }