Skip to content

Commit

Permalink
Add Azure Domain Secret
Browse files Browse the repository at this point in the history
  • Loading branch information
devlead committed Oct 7, 2023
1 parent 55c9e55 commit edb6812
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:
NUGET_SOURCE: ${{ secrets.NUGET_SOURCE }}
NUGET_APIKEY: ${{ secrets.NUGET_APIKEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AZURE_CONTAINER_REGISTRY: ${{ secrets.AZURE_CONTAINER_REGISTRY }}
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
AZURE_AUTHORITY_HOST: "https://login.microsoftonline.com"
AZURE_DOMAIN: ${{ secrets.AZURE_DOMAIN }}
with:
cake-version: tool-manifest
target: GitHub-Actions
Expand Down
4 changes: 2 additions & 2 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ Task("Clean")
.WithCriteria<BuildData>((context, data) => data.ShouldRunIntegrationTests(), "ShouldRunIntegrationTests")
.Does<BuildData>(
async (context, data) => {
var resultPath = data.IntegrationTestPath.Combine(data.AzureTenantId);
var resultPath = data.IntegrationTestPath.Combine(data.AzureDomain);
await GitHubActions.Commands.UploadArtifact(
resultPath,
data.AzureTenantId
data.AzureDomain
);
GitHubActions.Commands.SetStepSummary(
string.Join(
Expand Down
3 changes: 2 additions & 1 deletion build/records.cake
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ public record BuildData(
);

public string AzureTenantId { get; } = System.Environment.GetEnvironmentVariable("AZURE_TENANT_ID");
public string AzureDomain { get; } = System.Environment.GetEnvironmentVariable("AZURE_DOMAIN");

public bool ShouldRunIntegrationTests() => !string.IsNullOrWhiteSpace(AzureTenantId) &&
public bool ShouldRunIntegrationTests() => !string.IsNullOrWhiteSpace(AzureDomain) &&
(
AzureCredentials.AzureCredentialsSpecified ||
IsLocalBuild
Expand Down

0 comments on commit edb6812

Please sign in to comment.