mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-02 20:21:59 -05:00
ci: reclaim root-owned workspace files before checkout on self-hosted runners (#2713)
This commit is contained in:
1 parent
dc98b6b96a
commit
1ab090405e
1 file changed
+6
@@ -152,6 +152,9 @@ jobs:
|
|||||||
runs-on: ${{ fromJSON(needs.components-runner.outputs.labels) }}
|
runs-on: ${{ fromJSON(needs.components-runner.outputs.labels) }}
|
||||||
timeout-minutes: 40
|
timeout-minutes: 40
|
||||||
steps:
|
steps:
|
||||||
|
- name: Reclaim files a cancelled container build left owned by root
|
||||||
|
if: runner.environment == 'self-hosted'
|
||||||
|
run: sudo -n chown -R "$(id -u):$(id -g)" "$GITHUB_WORKSPACE" || echo "::warning::could not reclaim $GITHUB_WORKSPACE"
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||||
@@ -350,6 +353,9 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
variants: ${{ steps.variants.outputs.list }}
|
variants: ${{ steps.variants.outputs.list }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Reclaim files a cancelled container build left owned by root
|
||||||
|
if: runner.environment == 'self-hosted'
|
||||||
|
run: sudo -n chown -R "$(id -u):$(id -g)" "$GITHUB_WORKSPACE" || echo "::warning::could not reclaim $GITHUB_WORKSPACE"
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||||
|
|||||||
Reference in new issue
Block a user