├── .github └── workflows │ └── main.yml ├── LICENSE ├── README.md ├── action.yml └── renovate.json /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Builds, tests & co 2 | 3 | on: 4 | pull_request: 5 | push: 6 | schedule: 7 | # Prime the caches every Monday 8 | - cron: 0 1 * * MON 9 | 10 | permissions: read-all 11 | 12 | jobs: 13 | test: 14 | name: Test 15 | 16 | strategy: 17 | fail-fast: false 18 | matrix: 19 | os: 20 | - macos-latest 21 | - ubuntu-latest 22 | - windows-latest 23 | 24 | runs-on: ${{ matrix.os }} 25 | 26 | steps: 27 | - name: Checkout tree 28 | uses: actions/checkout@v4 29 | 30 | - name: Tune GitHub-hosted runner network 31 | uses: ./ 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright (c) 2023, Sora Morimoto 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any 6 | purpose with or without fee is hereby granted, provided that the above 7 | copyright notice and this permission notice appear in all copies. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tune GitHub-hosted runner network 2 | 3 | This action aims to provide an OS-neutral interface to disable TCP/UDP offload 4 | to fix flaky networking on GitHub-hosted runners. 5 | 6 | ### Motivation 7 | 8 | [actions/runner-images#1187](https://github.com/actions/runner-images/issues/1187) 9 | 10 | ### Roadmap 11 | 12 | Once `@actions/runner-images-team` resolves the upstream issue, we will mark the 13 | action as deprecated. As it is impossible to eliminate the action from 14 | everyone's workflow even if we mark the action as deprecated, and since it is 15 | unsure whether we can continue to provide full support after that, we aim not to 16 | add any runtime dependencies. So we do not merge pull requests that migrate to 17 | the 18 | [JavaScript action](https://docs.github.com/en/actions/creating-actions/about-custom-actions). 19 | 20 | ### Usage 21 | 22 | We adhere to [semantic versioning](https://semver.org), it's safe to use the 23 | major version (`v1`) in your workflow. 24 | 25 | ```yml 26 | runs-on: ubuntu-latest 27 | 28 | steps: 29 | - name: Tune GitHub-hosted runner network 30 | uses: smorimoto/tune-github-hosted-runner-network@v1 31 | 32 | - name: Checkout tree 33 | uses: actions/checkout@v4 34 | ``` 35 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: Tune GitHub-hosted runner network 2 | description: OS-neutral interface to disable TCP/UDP offload to fix flaky networking on GitHub-hosted runners 3 | author: Sora Morimoto 4 | branding: 5 | icon: wifi 6 | color: gray-dark 7 | runs: 8 | using: composite 9 | steps: 10 | - name: Tune Linux Network 11 | if: ${{ runner.os == 'Linux' }} 12 | shell: bash 13 | run: sudo ethtool -K eth0 tx off rx off 14 | 15 | - name: Tune Windows Network 16 | if: ${{ runner.os == 'Windows' }} 17 | shell: pwsh 18 | run: Disable-NetAdapterChecksumOffload -Name * -TcpIPv4 -UdpIPv4 -TcpIPv6 -UdpIPv6 19 | 20 | - name: Tune macOS Network 21 | if: ${{ runner.os == 'macOS' }} 22 | shell: bash 23 | run: | 24 | sudo sysctl -w net.link.generic.system.hwcksum_tx=0 25 | sudo sysctl -w net.link.generic.system.hwcksum_rx=0 26 | -------------------------------------------------------------------------------- /renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.renovatebot.com/renovate-schema.json", 3 | "extends": [ 4 | "config:recommended", 5 | ":disableRateLimiting", 6 | ":semanticCommitsDisabled" 7 | ], 8 | "rebaseWhen": "conflicted" 9 | } 10 | --------------------------------------------------------------------------------