Skip to content

Commit

Permalink
Merge pull request #27 from UmbrellaDocs/runs-on-latest
Browse files Browse the repository at this point in the history
User namespace cloning on 24.04
  • Loading branch information
gaurav-nelson authored Oct 21, 2024
2 parents 0461511 + 9443cd3 commit fc382e1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
test-check:
name: runner / linkspector (github-check)
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
Expand All @@ -22,7 +22,7 @@ jobs:
test-pr-check:
if: github.event_name == 'pull_request'
name: runner / linkspector (github-pr-check)
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
Expand All @@ -34,7 +34,7 @@ jobs:
test-pr-review:
if: github.event_name == 'pull_request'
name: runner / linkspector (github-pr-review)
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,13 @@ This action runs [Linkspector](https://github.com/UmbrellaDocs/linkspector) with
1. Create a new file in your repository `.github/workflows/action.yml`.
1. Copy-paste the following workflow in your `action.yml` file:

> **IMPORTANT**: Make sure to use `ubuntu-22.04` as the runner for this action. See https://github.com/UmbrellaDocs/action-linkspector/issues/25 for more details.
```yaml
name: Linkspector
on: [pull_request]
jobs:
check-links:
name: runner / linkspector
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run linkspector
Expand Down
9 changes: 9 additions & 0 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@ echo '🔗💀 linkspector version:'
linkspector --version
echo '::endgroup::'

echo '::group::🔗💀 Setting up Chrome Linux Sandbox'
# Based on the recommendation from https://pptr.dev/troubleshooting#recommended-enable-user-namespace-cloning
if [ "$(lsb_release -rs)" = "24.04" ]; then
sudo sysctl -w kernel.unprivileged_userns_clone=1
echo 'Done'
fi

echo '::endgroup::'

echo '::group:: Running linkspector with reviewdog 🐶 ...'
linkspector check -c "${INPUT_CONFIG_FILE}" -j |
reviewdog -f=rdjson \
Expand Down

0 comments on commit fc382e1

Please sign in to comment.