From c91912b02faa8397f6eb266b96a755d742ccf582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mitka?= Date: Thu, 7 Dec 2023 19:00:31 +0100 Subject: [PATCH] Missing secrets --- src/Program.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Program.cs b/src/Program.cs index 6a1ff0c..337933c 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -191,8 +191,11 @@ private static string GenerateWorkflow(string sourceOrg, string sourceRepo, stri - name: Cleanup if: always() shell: pwsh + env: + SOURCE_PAT: ${{{{ secrets.SECRETS_MIGRATOR_SOURCE_PAT }}}} run: | Write-Output ""Cleaning up..."" + $sourcePat = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("":$($env:SOURCE_PAT)"")) Invoke-RestMethod -Uri ""https://api.github.com/repos/${{{{ github.repository }}}}/actions/secrets/SECRETS_MIGRATOR_TARGET_PAT"" -Method ""DELETE"" -Headers @{{ Authorization = ""Basic $sourcePat"" }} Invoke-RestMethod -Uri ""https://api.github.com/repos/${{{{ github.repository }}}}/actions/secrets/SECRETS_MIGRATOR_SOURCE_PAT"" -Method ""DELETE"" -Headers @{{ Authorization = ""Basic $sourcePat"" }} Invoke-RestMethod -Uri ""https://api.github.com/repos/${{{{ github.repository }}}}/git/${{{{ github.ref }}}}"" -Method ""DELETE"" -Headers @{{ Authorization = ""Basic $sourcePat"" }}