Skip to content

Commit 7b72d3f

Browse files
committed
workflows used $env:xyz inside steps
Instead of the ${{ env/runner.xyz }} and similar.
1 parent f9f211a commit 7b72d3f

File tree

1 file changed

+22
-24
lines changed

1 file changed

+22
-24
lines changed

.github/workflows/clang-cl-qt6.yml

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
- name: TinyORM prepare environment
4040
run: |
41-
$runnerWorkPath = Resolve-Path -Path '${{ runner.workspace }}/..'
41+
$runnerWorkPath = Resolve-Path -Path "$env:RUNNER_WORKSPACE/.."
4242
"TinyRunnerWorkPath=$runnerWorkPath" >> $env:GITHUB_ENV
4343
4444
$sqlitePath = Join-Path -Path $runnerWorkPath -ChildPath "SQLite/$env:DB_SQLITE_DATABASE"
@@ -70,7 +70,7 @@ jobs:
7070
- name: PostgreSQL SSL certificates initialize
7171
id: openssl-initialize-postgresql-certificates
7272
run: |
73-
$folderPath = Join-Path -Path '${{ env.TinyRunnerWorkPath }}' `
73+
$folderPath = Join-Path -Path $env:TinyRunnerWorkPath `
7474
-ChildPath 'tiny-postgresql-certificates'
7575
7676
# Create an empty folder for generating certificates
@@ -261,15 +261,15 @@ jobs:
261261

262262
- name: MySQL create data folder
263263
run: |
264-
New-Item -Type Directory '${{ env.TinyMySQLDataPath }}'
264+
New-Item -Type Directory $env:TinyMySQLDataPath
265265
266266
- name: MySQL initialize my.ini configuration
267267
working-directory: .github/resources/windows
268268
run: >-
269269
(Get-Content -Path ./my_8_ssl.template.ini) -creplace
270-
'\{MYSQL_DATADIR\}', '${{ env.TinyMySQLDataPath }}' -creplace
270+
'\{MYSQL_DATADIR\}', $env:TinyMySQLDataPath -creplace
271271
'\{MYSQL_HOST\}', $env:DB_MYSQL_HOST |
272-
Set-Content -Path '${{ env.TinyMySQLInstallationPath }}/my.ini'
272+
Set-Content -Path "$env:TinyMySQLInstallationPath/my.ini"
273273
env:
274274
DB_MYSQL_HOST: ${{ secrets.DB_MYSQL_HOST_SSL }}
275275

@@ -297,7 +297,7 @@ jobs:
297297
- name: MySQL SSL certificates initialize
298298
id: openssl-initialize-mysql-certificates
299299
run: |
300-
$folderPath = Join-Path -Path '${{ env.TinyRunnerWorkPath }}' `
300+
$folderPath = Join-Path -Path $env:TinyRunnerWorkPath `
301301
-ChildPath 'tiny-mysql-certificates'
302302
303303
# Create an empty folder for generating certificates
@@ -385,17 +385,15 @@ jobs:
385385
working-directory: ${{ steps.openssl-initialize-mysql-certificates.outputs.FolderPath }}
386386
run: |
387387
Write-Output '::group::Install CA certificate'
388-
Move-Item -Path ./ca.pem -Destination '${{ env.TinyMySQLDataPath }}'
388+
Move-Item -Path ./ca.pem -Destination $env:TinyMySQLDataPath
389389
Write-Output '::endgroup::'
390390
391391
Write-Output '::group::Install server certificates'
392-
Move-Item -Path ./server-cert.pem, ./server-key.pem `
393-
-Destination '${{ env.TinyMySQLDataPath }}'
392+
Move-Item -Path ./server-cert.pem, ./server-key.pem -Destination $env:TinyMySQLDataPath
394393
Write-Output '::endgroup::'
395394
396395
Write-Output '::group::Install client certificates'
397-
Move-Item -Path ./client-cert.pem, ./client-key.pem `
398-
-Destination '${{ env.TinyMySQLDataPath }}'
396+
Move-Item -Path ./client-cert.pem, ./client-key.pem -Destination $env:TinyMySQLDataPath
399397
Write-Output '::endgroup::'
400398
401399
- name: MySQL service install/start
@@ -411,8 +409,8 @@ jobs:
411409
run: >-
412410
"alter user '$env:DB_MYSQL_ROOT_USERNAME'@'localhost'
413411
identified with caching_sha2_password by '$env:DB_MYSQL_ROOT_PASSWORD'
414-
require issuer '${{ env.DB_MYSQL_SSL_SUBJECT_CA }}' and
415-
subject '${{ env.DB_MYSQL_SSL_SUBJECT_CLIENT }}';" |
412+
require issuer '$env:DB_MYSQL_SSL_SUBJECT_CA' and
413+
subject '$env:DB_MYSQL_SSL_SUBJECT_CLIENT';" |
416414
mysql.exe --user=$env:DB_MYSQL_ROOT_USERNAME
417415
--password=$($env:secured_password | ConvertTo-SecureString |
418416
ConvertFrom-SecureString -AsPlainText)
@@ -430,12 +428,12 @@ jobs:
430428
$filename = (Split-Path -Path $env:URL_MYSQL_TIMEZONE_TABLES -Leaf)
431429
"Filename=$filename" >> $env:GITHUB_OUTPUT
432430
433-
$filepath = Join-Path -Path ${{ runner.temp }} -ChildPath $filename
431+
$filepath = Join-Path -Path $env:RUNNER_TEMP -ChildPath $filename
434432
"Filepath=$filepath" >> $env:GITHUB_OUTPUT
435433
436434
$basename = Split-Path -Path $filename -LeafBase
437435
438-
$extractedFolder = Join-Path -Path ${{ runner.temp }} -ChildPath $basename
436+
$extractedFolder = Join-Path -Path $env:RUNNER_TEMP -ChildPath $basename
439437
"ExtractedFolder=$extractedFolder" >> $env:GITHUB_OUTPUT
440438
441439
"Hash=$basename" >> $env:GITHUB_OUTPUT
@@ -461,7 +459,7 @@ jobs:
461459
Select-Object -ExpandProperty Content |
462460
Set-Content -Path $env:archive_filepath -AsByteStream
463461
464-
7z.exe x -y -o'${{ runner.temp }}' "$env:archive_filepath"
462+
7z.exe x -y -o"$env:RUNNER_TEMP" $env:archive_filepath
465463
env:
466464
archive_filepath: ${{ steps.downloads-initialize-mysql-timezone-tables.outputs.Filepath }}
467465
URL_MYSQL_TIMEZONE_TABLES: ${{ secrets.URL_MYSQL_TIMEZONE_TABLES }}
@@ -520,8 +518,8 @@ jobs:
520518
run: >-
521519
"create user '$env:DB_MYSQL_USERNAME'@'%'
522520
identified with caching_sha2_password by '$env:DB_MYSQL_PASSWORD'
523-
require issuer '${{ env.DB_MYSQL_SSL_SUBJECT_CA }}' and
524-
subject '${{ env.DB_MYSQL_SSL_SUBJECT_CLIENT }}';
521+
require issuer '$env:DB_MYSQL_SSL_SUBJECT_CA' and
522+
subject '$env:DB_MYSQL_SSL_SUBJECT_CLIENT';
525523
grant all privileges on ``tinyorm\_%``.* to '$env:DB_MYSQL_USERNAME'@'%';
526524
grant select on ``mysql``.``time_zone_name`` to '$env:DB_MYSQL_USERNAME'@'%';
527525
flush privileges;" |
@@ -536,16 +534,16 @@ jobs:
536534

537535
- name: MySQL add libmysql.dll on the $env:Path, INCLUDE, and LIB
538536
run: |
539-
'${{ env.TinyMySQLInstallationPath }}\lib' >> $env:GITHUB_PATH
537+
"$env:TinyMySQLInstallationPath\lib" >> $env:GITHUB_PATH
540538
# Needed by the lastest FindMySQL.cmake module, it stopped working without this
541-
'INCLUDE=${{ env.TinyMySQLInstallationPath }}\include' >> $env:GITHUB_ENV
542-
'LIB=${{ env.TinyMySQLInstallationPath }}\lib' >> $env:GITHUB_ENV
539+
"INCLUDE=$env:TinyMySQLInstallationPath\include" >> $env:GITHUB_ENV
540+
"LIB=$env:TinyMySQLInstallationPath\lib" >> $env:GITHUB_ENV
543541
544542
- name: SQLite create TinyORM database
545543
run: |
546-
New-Item -Type Directory (Split-Path -Parent -Path '${{ env.TinySQLitePath }}')
544+
New-Item -Type Directory (Split-Path -Parent -Path $env:TinySQLitePath)
547545
548-
New-Item -Type File -Path '${{ env.TinySQLitePath }}'
546+
New-Item -Type File -Path $env:TinySQLitePath
549547
550548
- name: Print MySQL, PostgreSQL database versions
551549
run: |
@@ -609,7 +607,7 @@ jobs:
609607
-QtRootPath (Get-Item -Path $env:QT_PLUGIN_PATH).Parent.Parent.Parent
610608
-QtVersion $env:TINY_QT_VERSION -QtSpec $env:TINY_QT_SPEC
611609
-MySQLServerPath $env:TinyMySQLInstallationPath
612-
-BuildPath '${{ runner.workspace }}'
610+
-BuildPath $env:RUNNER_WORKSPACE
613611
614612
- name: Cache LLVM and Clang
615613
id: llvm-cache

0 commit comments

Comments
 (0)