Skip to content

Commit

Permalink
fix: test build mount set to parent of current workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
easimon committed Dec 4, 2023
1 parent bb67daa commit cd652e0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,31 @@ jobs:
with:
build-mount-path: /var/lib/docker/tmp

test-mount-parent-of-workspace:
name: Test mounting the parent of GITHUB_WORKSPACE
runs-on: ubuntu-latest
steps:
- name: Check out Maximize Build Space action
uses: actions/checkout@v4
with:
path: ./.github/actions/maximize-test

- name: Calculate parent of workspace
id: workspace-parent
run: echo "parent=$(dirname "${GITHUB_WORKSPACE}")" >> "$GITHUB_OUTPUT"

- name: Maximize build space
uses: ./.github/actions/maximize-test
with:
build-mount-path: ${{ steps.workspace-parent.outputs.parent }}

- name: Create file in build folder as runner user (test ownership)
run: |
mkdir -p ${{ steps.workspace-parent.outputs.parent }}/new
touch ${{ steps.workspace-parent.outputs.parent }}/new/file.txt
touch ${GITHUB_WORKSPACE}/file.txt
ls -alR ${{ steps.workspace-parent.outputs.parent }}
determine-free-space:
name: Determine free space with different settings
runs-on: ${{ matrix.os }}
Expand Down

0 comments on commit cd652e0

Please sign in to comment.