Skip to content

Commit ffb3a6e

Browse files
bcbuild-github-agentmicrosoft
and
microsoft
authored
Deploying AL-Go from main (a2c4efcc730e9b264f74cb321e7c2193c8c96b8d) to main (microsoft#72)
Deploying AL-Go from main (a2c4efcc730e9b264f74cb321e7c2193c8c96b8d) to main Co-authored-by: microsoft <[email protected]>
1 parent 173f75a commit ffb3a6e

23 files changed

+522
-336
lines changed

Diff for: .AL-Go/cloudDevEnv.ps1

+20-11
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ Param(
1212

1313
$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
1414

15+
function DownloadHelperFile {
16+
param(
17+
[string] $url,
18+
[string] $folder
19+
)
20+
21+
$prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue'
22+
$name = [System.IO.Path]::GetFileName($url)
23+
Write-Host "Downloading $name from $url"
24+
$path = Join-Path $folder $name
25+
Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path
26+
$ProgressPreference = $prevProgressPreference
27+
return $path
28+
}
29+
1530
try {
1631
Clear-Host
1732
Write-Host
@@ -25,17 +40,11 @@ Write-Host -ForegroundColor Yellow @'
2540
2641
'@
2742

28-
$webClient = New-Object System.Net.WebClient
29-
$webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumentList ([System.Net.Cache.RequestCacheLevel]::NoCacheNoStore)
30-
$webClient.Encoding = [System.Text.Encoding]::UTF8
31-
$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.2/Github-Helper.psm1'
32-
Write-Host "Downloading GitHub Helper module from $GitHubHelperUrl"
33-
$GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1"
34-
$webClient.DownloadFile($GitHubHelperUrl, $GitHubHelperPath)
35-
$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.2/AL-Go-Helper.ps1'
36-
Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl"
37-
$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1"
38-
$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath)
43+
$tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())"
44+
New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null
45+
$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.3/Github-Helper.psm1' -folder $tmpFolder
46+
$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.3/AL-Go-Helper.ps1' -folder $tmpFolder
47+
DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.3/Packages.json' -folder $tmpFolder | Out-Null
3948

4049
Import-Module $GitHubHelperPath
4150
. $ALGoHelperPath -local

Diff for: .AL-Go/localDevEnv.ps1

+20-11
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@ Param(
1616

1717
$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
1818

19+
function DownloadHelperFile {
20+
param(
21+
[string] $url,
22+
[string] $folder
23+
)
24+
25+
$prevProgressPreference = $ProgressPreference; $ProgressPreference = 'SilentlyContinue'
26+
$name = [System.IO.Path]::GetFileName($url)
27+
Write-Host "Downloading $name from $url"
28+
$path = Join-Path $folder $name
29+
Invoke-WebRequest -UseBasicParsing -uri $url -OutFile $path
30+
$ProgressPreference = $prevProgressPreference
31+
return $path
32+
}
33+
1934
try {
2035
Clear-Host
2136
Write-Host
@@ -29,17 +44,11 @@ Write-Host -ForegroundColor Yellow @'
2944
3045
'@
3146

32-
$webClient = New-Object System.Net.WebClient
33-
$webClient.CachePolicy = New-Object System.Net.Cache.RequestCachePolicy -argumentList ([System.Net.Cache.RequestCacheLevel]::NoCacheNoStore)
34-
$webClient.Encoding = [System.Text.Encoding]::UTF8
35-
$GitHubHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.2/Github-Helper.psm1'
36-
Write-Host "Downloading GitHub Helper module from $GitHubHelperUrl"
37-
$GitHubHelperPath = "$([System.IO.Path]::GetTempFileName()).psm1"
38-
$webClient.DownloadFile($GitHubHelperUrl, $GitHubHelperPath)
39-
$ALGoHelperUrl = 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.2/AL-Go-Helper.ps1'
40-
Write-Host "Downloading AL-Go Helper script from $ALGoHelperUrl"
41-
$ALGoHelperPath = "$([System.IO.Path]::GetTempFileName()).ps1"
42-
$webClient.DownloadFile($ALGoHelperUrl, $ALGoHelperPath)
47+
$tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) "$([Guid]::NewGuid().ToString())"
48+
New-Item -Path $tmpFolder -ItemType Directory -Force | Out-Null
49+
$GitHubHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.3/Github-Helper.psm1' -folder $tmpFolder
50+
$ALGoHelperPath = DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.3/AL-Go-Helper.ps1' -folder $tmpFolder
51+
DownloadHelperFile -url 'https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v5.3/Packages.json' -folder $tmpFolder | Out-Null
4352

4453
Import-Module $GitHubHelperPath
4554
. $ALGoHelperPath -local

Diff for: .github/RELEASENOTES.copy.md

+157-23
Large diffs are not rendered by default.

Diff for: .github/workflows/AddExistingAppOrTestApp.yaml

+12-10
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ on:
2222
default: false
2323

2424
permissions:
25+
actions: read
2526
contents: write
27+
id-token: write
2628
pull-requests: write
2729

2830
defaults:
@@ -39,48 +41,48 @@ jobs:
3941
runs-on: [ windows-latest ]
4042
steps:
4143
- name: Dump Workflow Information
42-
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.2
44+
uses: microsoft/AL-Go-Actions/DumpWorkflowInfo@v5.3
4345
with:
4446
shell: powershell
4547

4648
- name: Checkout
47-
uses: actions/checkout@v4
49+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4850

4951
- name: Initialize the workflow
5052
id: init
51-
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.2
53+
uses: microsoft/AL-Go-Actions/WorkflowInitialize@v5.3
5254
with:
5355
shell: powershell
54-
eventId: "DO0090"
5556

5657
- name: Read settings
57-
uses: microsoft/AL-Go-Actions/ReadSettings@v5.2
58+
uses: microsoft/AL-Go-Actions/ReadSettings@v5.3
5859
with:
5960
shell: powershell
6061

6162
- name: Read secrets
6263
id: ReadSecrets
63-
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.2
64+
uses: microsoft/AL-Go-Actions/ReadSecrets@v5.3
6465
with:
6566
shell: powershell
6667
gitHubSecrets: ${{ toJson(secrets) }}
6768
getSecrets: 'TokenForPush'
6869
useGhTokenWorkflowForPush: '${{ github.event.inputs.useGhTokenWorkflow }}'
6970

7071
- name: Add existing app
71-
uses: microsoft/AL-Go-Actions/AddExistingApp@v5.2
72+
uses: microsoft/AL-Go-Actions/AddExistingApp@v5.3
7273
with:
7374
shell: powershell
7475
token: ${{ steps.ReadSecrets.outputs.TokenForPush }}
75-
parentTelemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }}
7676
project: ${{ github.event.inputs.project }}
7777
url: ${{ github.event.inputs.url }}
7878
directCommit: ${{ github.event.inputs.directCommit }}
7979

8080
- name: Finalize the workflow
8181
if: always()
82-
uses: microsoft/AL-Go-Actions/[email protected]
82+
uses: microsoft/AL-Go-Actions/[email protected]
83+
env:
84+
GITHUB_TOKEN: ${{ github.token }}
8385
with:
8486
shell: powershell
85-
eventId: "DO0090"
8687
telemetryScopeJson: ${{ steps.init.outputs.telemetryScopeJson }}
88+
currentJobContext: ${{ toJson(job) }}

0 commit comments

Comments
 (0)