From 076d05dd10402073c46bb849829cabb20b213885 Mon Sep 17 00:00:00 2001 From: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com> Date: Fri, 2 May 2025 06:17:57 +0000 Subject: [PATCH 1/3] Use app as GHTokenWorkflow --- e2eTests/scenarios/PowerPlatform/runtest.ps1 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/e2eTests/scenarios/PowerPlatform/runtest.ps1 b/e2eTests/scenarios/PowerPlatform/runtest.ps1 index ed237d0eb..55393ed7d 100644 --- a/e2eTests/scenarios/PowerPlatform/runtest.ps1 +++ b/e2eTests/scenarios/PowerPlatform/runtest.ps1 @@ -73,10 +73,8 @@ foreach($sourceRepo in $repositories) { Write-Host "PowerPlatform Solution Folder: $($settings.powerPlatformSolutionFolder)" # Upgrade AL-Go System Files to test version - # TODO: Use e2epat until bcsamples powerplatform repositories have been updated to latest version - RunUpdateAlGoSystemFiles -directCommit -wait -templateUrl $template -ghTokenWorkflow $e2epat -repository $repository | Out-Null - SetRepositorySecret -repository $repository -name 'GHTOKENWORKFLOW' -value $algoauthapp + RunUpdateAlGoSystemFiles -templateUrl $template -wait -repository $repository | Out-Null CancelAllWorkflows -repository $repository From 39d7b499fdce1d6d111dea22ebd7d0e77e64da4f Mon Sep 17 00:00:00 2001 From: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com> Date: Fri, 2 May 2025 06:19:41 +0000 Subject: [PATCH 2/3] Use calculated github owner --- .github/workflows/CleanupTempRepos.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CleanupTempRepos.yaml b/.github/workflows/CleanupTempRepos.yaml index cbb3db6b1..e7352baf4 100644 --- a/.github/workflows/CleanupTempRepos.yaml +++ b/.github/workflows/CleanupTempRepos.yaml @@ -30,14 +30,6 @@ jobs: with: egress-policy: audit - - uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2 - id: app-token - if: ${{ vars.E2E_APP_ID != '' }} - with: - app-id: ${{ vars.E2E_APP_ID }} - private-key: ${{ secrets.E2E_PRIVATE_KEY }} - owner: ${{ github.event.inputs.githubOwner }} - - name: Check E2EPAT Secret is defined if: ${{ vars.E2E_APP_ID == '' }} run: | @@ -55,6 +47,14 @@ jobs: run: | ${{ github.workspace }}/Internal/Scripts/GetOwnerForE2ETests.ps1 -githubOwner $env:githubOwner + - uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2 + id: app-token + if: ${{ vars.E2E_APP_ID != '' }} + with: + app-id: ${{ vars.E2E_APP_ID }} + private-key: ${{ secrets.E2E_PRIVATE_KEY }} + owner: ${{ steps.getGitHubOwner.outputs.githubOwner }} + - name: Cleanup Temp Repositories env: githubOwner: ${{ steps.getGitHubOwner.outputs.githubOwner }} From 9f2e81e31f53aa84aa3933e8d8472d20935c22db Mon Sep 17 00:00:00 2001 From: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com> Date: Tue, 6 May 2025 08:22:04 +0200 Subject: [PATCH 3/3] Update e2eTests/scenarios/PowerPlatform/runtest.ps1 --- e2eTests/scenarios/PowerPlatform/runtest.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2eTests/scenarios/PowerPlatform/runtest.ps1 b/e2eTests/scenarios/PowerPlatform/runtest.ps1 index 55393ed7d..39e8f0c03 100644 --- a/e2eTests/scenarios/PowerPlatform/runtest.ps1 +++ b/e2eTests/scenarios/PowerPlatform/runtest.ps1 @@ -74,7 +74,7 @@ foreach($sourceRepo in $repositories) { # Upgrade AL-Go System Files to test version SetRepositorySecret -repository $repository -name 'GHTOKENWORKFLOW' -value $algoauthapp - RunUpdateAlGoSystemFiles -templateUrl $template -wait -repository $repository | Out-Null + RunUpdateAlGoSystemFiles -directCommit -templateUrl $template -wait -repository $repository | Out-Null CancelAllWorkflows -repository $repository