build: Add a step to fix workspace permissions on bare-metal workers

When a bare-metal worker is canceled, its workspace can be left with
files owned by the root user as a result of running tests from our
container. This patch add a step to fix workspace permissions for such
case before checking out code.

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen 2024-02-29 14:23:30 -08:00 committed by Rob Bradford
parent d3fade85a7
commit f48942ce3f
4 changed files with 11 additions and 0 deletions

View File

@ -7,6 +7,8 @@ jobs:
name: Tests (ARM64)
runs-on: focal-arm64
steps:
- name: Fix workspace permissions
run: sudo chown -R github-runner:github-runner ${GITHUB_WORKSPACE}
- name: Code checkout
uses: actions/checkout@v4
with:

View File

@ -9,6 +9,9 @@ jobs:
name: Tests (Rate-Limiter)
runs-on: jammy-rate-limiter
steps:
- name: Fix workspace permissions
if: ${{ github.event_name != 'pull_request' }}
run: sudo chown -R github-runner:github-runner ${GITHUB_WORKSPACE}
- name: Code checkout
uses: actions/checkout@v4
with:

View File

@ -9,6 +9,9 @@ jobs:
name: Tests (SGX)
runs-on: jammy-sgx
steps:
- name: Fix workspace permissions
if: ${{ github.event_name != 'pull_request' }}
run: sudo chown -R github-runner:github-runner ${GITHUB_WORKSPACE}
- name: Code checkout
uses: actions/checkout@v4
with:

View File

@ -9,6 +9,9 @@ jobs:
name: Tests (VFIO)
runs-on: jammy-vfio
steps:
- name: Fix workspace permissions
if: ${{ github.event_name != 'pull_request' }}
run: sudo chown -R github-runner:github-runner ${GITHUB_WORKSPACE}
- name: Code checkout
uses: actions/checkout@v4
with: