Skip to content

Commit

Permalink
workflows reverted run Linux runner after Windows
Browse files Browse the repository at this point in the history
GitHub self-hosted runner runs under the NetworkService account and it
doesn't have enough prvileges to execute the vmrun.exe or to invoke
the Start-ScheduledTask command. I don't want to run this service
under the SYSTEM account. I will have to figure this out in the future.
For now, I will have to invoke Linux self-hosted workflow manually after
the Windows self-hosted workflows finish.

[skip ci]
  • Loading branch information
silverqx committed May 4, 2024
1 parent 5e566ae commit 14ac290
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/msys2-ucrt64-drivers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,41 +261,3 @@ jobs:
DB_MYSQL_PASSWORD: ${{ secrets.DB_MYSQL_PASSWORD_SELF_MSYS2 }}
DB_MYSQL_USERNAME: ${{ secrets.DB_MYSQL_USERNAME_SELF_MSYS2 }}
TOM_EXAMPLE_ENV: ${{ vars.TOM_EXAMPLE_ENV }}

# Start Linux VM runner immediately if there are <=2 matrix combinations or for the penultimate
# matrix combination job (to give the runner some time to resume and connect to the network)
- name: Prepare Start Linux runner
id: vm-start-linux-runner
run: >-
$shouldStartRunner =
(${{ strategy.job-total }} -le 2 -and ${{ strategy.job-index }} -eq 0) -or
${{ strategy.job-index }} -eq ${{ strategy.job-total }} - 2 ? 'true' : 'false'
"StartLinuxRunner=shouldStartRunner" >> $env:GITHUB_OUTPUT
- name: Start Linux runner
if: steps.vm-start-linux-runner.outputs.StartLinuxRunner == 'true'
working-directory: E:/dotfiles/bin
run: |
.\Start-TinyORMActions.ps1
# The reason for this is the concurrency:group: can contain only two in_progress workflows,
# one will be in_progress and the second will be queued (waiting until the first finish),
# and all others will be canceled.
# Jobs are run randomly! They are sorted from 0 to strategy.job-total - 1 in GitHub UI, so
# the first job has index 0, the second job has index 1, ...
# Execute the next workflow inly if it's active and isn't disabled (disabled_manually state).
# Also, if the step fails due to any error, continue (eg. network unreachable or similar).
- name: Run linux-qt6-drivers.yml workflows
continue-on-error: true
if: strategy.job-index == 0
working-directory: ${{ env.TinyORMPath }}
run: |
$workflowState = gh workflow list --all --json path,state `
--jq '.[] | select (.path | endswith("/linux-qt6-drivers.yml")) | .state'
if ($? -and $workflowState -ceq 'active') {
gh workflow run linux-qt6-drivers.yml --ref ${{ github.ref_name }}
}
env:
GH_TOKEN: ${{ github.token }}

0 comments on commit 14ac290

Please sign in to comment.