action

command module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2025 License: MIT Imports: 9 Imported by: 0

README ยถ

runs-on/action

RunsOn Action for magic caching, and more. This action is required if you are using the magic caching feature of RunsOn (extras=s3-cache job label).

Usage

jobs:
  build:
    runs-on: runs-on=${{ github.run_id }}/runner=2cpu-linux-x64/extras=s3-cache
    steps:
      - uses: runs-on/action@v1
      - other steps

Options

show_env

Show all environment variables available to actions (used for debugging purposes).

jobs:
  build:
    runs-on: runs-on=${{ github.run_id }}/runner=2cpu-linux-x64/extras=s3-cache
    steps:
      - uses: runs-on/action@v1
        with:
          show_env: true
show_costs

Displays how much it cost to run that workflow job. Uses https://ec2-pricing.runs-on.com to get accurate data, for both on-demand and spot pricing across all regions and availability zones.

Beta: also compares with similar machine on GitHub.

Example output in the post-step:

| metric                 | value           |
| ---------------------- | --------------- |
| Instance Type          | m7i-flex.large  |
| Instance Lifecycle     | on-demand       |
| Region                 | us-east-1       |
| Duration               | 2.06 minutes    |
| Cost                   | $0.0040         |
| GitHub equivalent cost | $0.0240         |
| Savings                | $0.0200 (82.8%) |
metrics

Send additional metrics using CloudWatch agent.

Supported metrics:

Metric Type Available Metrics
cpu usage_user, usage_system
network bytes_recv, bytes_sent
memory used_percent
disk used_percent, inodes_used
io io_time, reads, writes
jobs:
  build:
    runs-on: runs-on=${{ github.run_id }}/runner=2cpu-linux-x64/extras=s3-cache
    steps:
      - uses: runs-on/action@v1
        with:
          metrics: cpu,network,memory,disk,io

The action will display live metrics with sparklines and charts in the post-execution summary.

Example output:
๐Ÿ“Š CPU User:
   100.0 โ”ค
    87.5 โ”ค
    75.0 โ”ค
    62.5 โ”ค
    50.0 โ”ค
    37.5 โ”ค
    25.0 โ”ค
    12.5 โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
     0.0 โ”ค
                               CPU User (Percent)
  Stats: min:7.4 avg:8.3 max:8.8 Percent



๐Ÿ“Š CPU System:
   100.0 โ”ค
    87.5 โ”ค
    75.0 โ”ค
    62.5 โ”ค
    50.0 โ”ค
    37.5 โ”ค
    25.0 โ”ค       โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ                     โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    12.5 โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ             โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
     0.0 โ”ค
                              CPU System (Percent)
  Stats: min:16.8 avg:18.7 max:20.7 Percent



๐Ÿ“Š Network Received:
   34314 โ”ผโ•ฎ
   31245 โ”คโ•ฐโ•ฎ
   28175 โ”ค โ•ฐโ•ฎ
   25106 โ”ค  โ•ฐโ”€โ•ฎ          โ•ญโ”€โ”€โ•ฎ
   22036 โ”ค    โ•ฐโ•ฎ       โ•ญโ”€โ•ฏ  โ•ฐโ•ฎ
   18967 โ”ค     โ•ฐโ•ฎ    โ•ญโ”€โ•ฏ     โ•ฐโ”€โ•ฎ          โ•ญโ”€โ”€โ”€โ•ฎ
   15898 โ”ค      โ•ฐโ•ฎ  โ•ญโ•ฏ         โ•ฐโ”€โ•ฎ     โ•ญโ”€โ”€โ•ฏ   โ•ฐโ”€โ”€โ”€โ•ฎ
   12828 โ”ค       โ•ฐโ”€โ”€โ•ฏ            โ•ฐโ•ฎ โ•ญโ”€โ”€โ•ฏ          โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
    9759 โ”ค                        โ•ฐโ”€โ•ฏ                     โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
                            Network Received (Bytes)
  Stats: min:9759.0 avg:16461.6 max:34314.0 Bytes



๐Ÿ“Š Network Sent:
   51281 โ”ผโ•ฎ
   46447 โ”คโ•ฐโ•ฎ
   41614 โ”ค โ•ฐโ•ฎ
   36780 โ”ค  โ•ฐโ•ฎ
   31946 โ”ค   โ•ฐโ”€โ•ฎ
   27113 โ”ค     โ•ฐโ•ฎ         โ•ญโ•ฎ
   22279 โ”ค      โ•ฐโ•ฎ   โ•ญโ”€โ”€โ”€โ”€โ•ฏโ•ฐโ”€โ”€โ•ฎ          โ•ญโ”€โ”€โ”€โ”€โ”€โ•ฎ
   17446 โ”ค       โ•ฐโ”€โ”€โ”€โ•ฏ        โ•ฐโ”€โ”€โ•ฎ   โ•ญโ”€โ”€โ”€โ•ฏ     โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
   12612 โ”ค                       โ•ฐโ”€โ”€โ”€โ•ฏ                โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
                              Network Sent (Bytes)
  Stats: min:12612.0 avg:22532.8 max:51281.0 Bytes



๐Ÿ“Š Memory Used:
   100.0 โ”ค
    87.5 โ”ค
    75.0 โ”ค
    62.5 โ”ค
    50.0 โ”ค
  Stats: min:504.0 avg:948.6 max:1281.0 ms



๐Ÿ“Š Disk Reads:
   25.0 โ”ผโ•ฎ
   21.9 โ”คโ•ฐโ•ฎ
   18.8 โ”ค โ•ฐโ”€โ•ฎ
   15.6 โ”ค   โ•ฐโ•ฎ
   12.5 โ”ค    โ•ฐโ•ฎ
    9.4 โ”ค     โ•ฐโ•ฎ                                                   โ•ญ
    6.3 โ”ค      โ•ฐโ•ฎ                                               โ•ญโ”€โ”€โ•ฏ
    3.2 โ”ค       โ•ฐโ”€โ”€โ”€โ”€โ•ฎ        โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ                      โ•ญโ”€โ”€โ•ฏ
    0.0 โ”ค            โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ       โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
                              Disk Reads (Ops/s)
  Stats: min:0.0 avg:5.0 max:25.0 Ops/s



๐Ÿ“Š Disk Writes:
   5973 โ”ค                โ•ญโ•ฎ
   5500 โ”ค               โ•ญโ•ฏโ•ฐโ•ฎ
   5028 โ”ผโ•ฎ             โ•ญโ•ฏ  โ•ฐโ•ฎ                   โ•ญโ”€โ”€โ”€โ•ฎ              โ•ญ
   4555 โ”คโ•ฐโ•ฎ           โ•ญโ•ฏ    โ•ฐโ•ฎ               โ•ญโ”€โ”€โ•ฏ   โ•ฐโ”€โ•ฎ          โ•ญโ”€โ•ฏ
   4083 โ”ค โ•ฐโ•ฎ         โ•ญโ•ฏ      โ•ฐโ”€โ•ฎ          โ•ญโ”€โ”€โ•ฏ        โ•ฐโ•ฎ       โ•ญโ”€โ•ฏ
   3610 โ”ค  โ•ฐโ”€โ•ฎ      โ•ญโ•ฏ         โ•ฐโ•ฎ      โ•ญโ”€โ”€โ•ฏ            โ•ฐโ”€โ•ฎ   โ•ญโ”€โ•ฏ
   3138 โ”ค    โ•ฐโ•ฎ    โ•ญโ•ฏ           โ•ฐโ•ฎ โ•ญโ”€โ”€โ”€โ•ฏ                 โ•ฐโ”€โ”€โ”€โ•ฏ
   2665 โ”ค     โ•ฐโ•ฎ  โ•ญโ•ฏ             โ•ฐโ”€โ•ฏ
   2193 โ”ค      โ•ฐโ”€โ”€โ•ฏ
                             Disk Writes (Ops/s)
  Stats: min:2040.0 avg:4180.9 max:6026.0 Ops/s
sccache

Only available for Linux runners.

Configures sccache so that you can cache the compilation of C/C++ code, Rust, as well as NVIDIA's CUDA.

The only parameter it can take for now is s3, which will auto-configure the S3 cache backend for sccache, using the RunsOn S3 cache bucket that comes for free (with crazy speed and unlimited storage) with your RunsOn installation.

Example:

jobs:
  build:
    runs-on: runs-on=${{ github.run_id }}/runner=2cpu-linux-x64/extras=s3-cache
    steps:
      - uses: runs-on/action@v1
        with:
          sccache: s3
      - uses: mozilla-actions/sccache-action@v0.0.9
      - run: # your slow rust compilation

What this does under the hood is the equivalent of:

echo "SCCACHE_GHA_ENABLED=false" >> $GITHUB_ENV
echo "SCCACHE_BUCKET=${{ env.RUNS_ON_S3_BUCKET_CACHE}}" >> $GITHUB_ENV
echo "SCCACHE_REGION=${{ env.RUNS_ON_AWS_REGION}}" >> $GITHUB_ENV
echo "SCCACHE_S3_KEY_PREFIX=cache/sccache" >> $GITHUB_ENV
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV

Development

Make your source code changes in a commit, then push the updated binaries and JS files in a separate commit:

make release

Future work

This action will probably host a few other features such as:

  • enabling/disabling SSM agent ?

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis
internal
env

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL