Skip to content

Commit

Permalink
Add workaround for self-hosted GH Action runner problem
Browse files Browse the repository at this point in the history
This works around actions/runner#434
  • Loading branch information
ivan4th committed May 20, 2022
1 parent 2696c75 commit 0b772e0
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ jobs:
# avoid conflicts between parallel jobs
K8S_ID_SUFFIX: ${{ matrix.build_type }}
steps:
# https://github.com/actions/runner/issues/434#issuecomment-992865457
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf /github/workspace/.* 2>/dev/null || rm -rf /github/workspace/*"
- name: Login to the registry
uses: docker/login-action@v1
with:
Expand Down Expand Up @@ -83,6 +88,10 @@ jobs:
checkstyle:
runs-on: ["self-hosted", "hugepages"]
steps:
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf /github/workspace/.* 2>/dev/null || rm -rf /github/workspace/*"
- name: Login to the registry
uses: docker/login-action@v1
with:
Expand All @@ -107,6 +116,10 @@ jobs:
BUILD_TYPE: ${{ matrix.build_type }}
needs: build
steps:
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf /github/workspace/.* 2>/dev/null || rm -rf /github/workspace/*"
- name: Login to the registry
uses: docker/login-action@v1
with:
Expand Down Expand Up @@ -137,6 +150,10 @@ jobs:
BUILD_TYPE: ${{ matrix.build_type }}
needs: build
steps:
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf /github/workspace/.* 2>/dev/null || rm -rf /github/workspace/*"
- name: Login to the registry
uses: docker/login-action@v1
with:
Expand All @@ -156,7 +173,7 @@ jobs:
run: |
dev_image=$(cat image-dev-${BUILD_TYPE}.txt)
mkdir junit-output
make retest-e2e \
if ! make retest-e2e \
DEV_IMAGE="${dev_image}" \
E2E_RETEST=y \
E2E_PARALLEL=y \
Expand All @@ -167,7 +184,10 @@ jobs:
E2E_FOCUS="${E2E_FOCUS}" \
E2E_SKIP="${E2E_SKIP}" \
E2E_NO_GDB=1 \
GRAB_ARTIFACTS=1
GRAB_ARTIFACTS=1; then
docker run -v "${PWD}:/src" alpine /bin/sh -c "chown -v -R $(id -u).$(id -g) /src/artifacts"
exit 1
fi
- name: Upload artifacts for failed tests
if: failure()
uses: actions/upload-artifact@v2
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ jobs:
release:
runs-on: self-hosted
steps:
- name: Clean the workspace
uses: docker://alpine
with:
args: /bin/sh -c "rm -rf /github/workspace/.* 2>/dev/null || rm -rf /github/workspace/*"

- name: Checkout
uses: actions/checkout@v2

Expand Down

0 comments on commit 0b772e0

Please sign in to comment.