Skip to content

runs-on/action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

17 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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@v2
      - 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@v2
        with:
          show_env: true

Possible values:

  • true - Show all environment variables
  • false - Don't show environment variables (default)

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%) |

Possible values:

  • inline - Display costs in the action log output (default)
  • summary - Display costs in the action log output and in the GitHub job summary
  • Any other value - Disables the feature

metrics

Note: this is currently only available with a development release of RunsOn. This will be fully functional with v2.8.4+

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@v2
        with:
          metrics: cpu,network,memory,disk,io

Possible values:

  • cpu - CPU usage metrics (usage_user, usage_system)
  • network - Network metrics (bytes_recv, bytes_sent)
  • memory - Memory metrics (used_percent)
  • disk - Disk metrics (used_percent, inodes_used)
  • io - I/O metrics (io_time, reads, writes)
  • Comma-separated combinations (e.g., cpu,network,memory,disk,io)
  • Empty string - No additional metrics (default)

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

๐Ÿ“ˆ Metrics (since 2025-06-30T14:18:56Z):


๐Ÿ“Š 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:0.0 avg:29.0 max:93.4 Percent


๐Ÿ“Š Memory Used:
   100.0 โ”ค
    87.5 โ”ค
    75.0 โ”ค
    62.5 โ”ค
    50.0 โ”ค
    37.5 โ”ค
    25.0 โ”ค                                             โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
    12.5 โ”ค                            โ•ญโ”€โ”€โ•ฎ      โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ        โ•ฐโ”€โ”€โ”€โ•ฎ
     0.0 โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ                   โ•ฐ
                             Memory Used (Percent)
  Stats: min:0.5 avg:7.4 max:20.9 Percent
Example full output:
๐Ÿ“ˆ Metrics (since 2025-06-30T14:18:56Z):


๐Ÿ“Š 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:0.0 avg:29.0 max:93.4 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:0.2 avg:5.0 max:33.7 Percent



๐Ÿ“Š Memory Used:
   100.0 โ”ค
    87.5 โ”ค
    75.0 โ”ค
    62.5 โ”ค
    50.0 โ”ค
    37.5 โ”ค
    25.0 โ”ค                                             โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
    12.5 โ”ค                            โ•ญโ”€โ”€โ•ฎ      โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ        โ•ฐโ”€โ”€โ”€โ•ฎ
     0.0 โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ                   โ•ฐ
                             Memory Used (Percent)
  Stats: min:0.5 avg:7.4 max:20.9 Percent



๐Ÿ“Š Disk Used:
   100.0 โ”ค
    87.5 โ”ค
    75.0 โ”ค            โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    62.5 โ”ค         โ•ญโ”€โ”€โ•ฏ
    50.0 โ”ค   โ•ญโ”€โ”€โ”€โ”€โ”€โ•ฏ
    37.5 โ”ผโ”€โ”€โ”€โ•ฏ
    25.0 โ”ค
    12.5 โ”ค
     0.0 โ”ค
                              Disk Used (Percent)
  Stats: min:35.6 avg:68.7 max:75.8 Percent



๐Ÿ“Š Disk Inodes Used:
   481238 โ”ค           โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
   450852 โ”ค          โ•ญโ•ฏ
   420466 โ”ค          โ”‚
   390080 โ”ค         โ•ญโ•ฏ
   359694 โ”ค         โ”‚
   329307 โ”ค        โ•ญโ•ฏ
   298921 โ”ค       โ•ญโ•ฏ
   268535 โ”ค   โ•ญโ”€โ”€โ”€โ•ฏ
   238149 โ”ผโ”€โ”€โ”€โ•ฏ
                            Disk Inodes Used (Inodes)
  Stats: min:238149.0 avg:440393.1 max:481238.0 Inodes



๐Ÿ“Š Disk IO Time:
   10000 โ”ค             โ•ญโ”€โ•ฎ
    8750 โ”ค   โ•ญโ•ฎ       โ•ญโ•ฏ โ•ฐโ•ฎ
    7500 โ”ค   โ”‚โ”‚      โ•ญโ•ฏ   โ”‚
    6251 โ”ค   โ”‚โ”‚      โ”‚    โ”‚
    5001 โ”ค  โ•ญโ•ฏโ•ฐโ•ฎ โ•ญโ•ฎ โ•ญโ•ฏ    โ”‚
    3751 โ”ค  โ”‚  โ”‚ โ”‚โ”‚ โ”‚     โ•ฐโ•ฎ
    2502 โ”ค  โ”‚  โ”‚โ•ญโ•ฏโ•ฐโ”€โ•ฏ      โ”‚
    1252 โ”ค โ•ญโ•ฏ  โ•ฐโ•ฏ          โ•ฐโ•ฎ                โ•ญโ”€โ”€โ•ฎ
       2 โ”ผโ”€โ•ฏ                โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ  โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
                               Disk IO Time (ms)
  Stats: min:1.0 avg:1581.3 max:10000.0 ms



๐Ÿ“Š Disk Reads:
   1472 โ”ค   โ•ญโ•ฎ
   1288 โ”ค   โ”‚โ”‚
   1104 โ”ค   โ”‚โ”‚
    920 โ”ค  โ•ญโ•ฏโ”‚
    736 โ”ค  โ”‚ โ•ฐโ•ฎ
    552 โ”ค  โ”‚  โ”‚
    368 โ”ค  โ”‚  โ”‚         โ•ญโ”€โ•ฎ
    184 โ”ค โ•ญโ•ฏ  โ•ฐโ•ฎ       โ•ญโ•ฏ โ•ฐโ”€โ•ฎ
      0 โ”ผโ”€โ•ฏ    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
                              Disk Reads (Ops/s)
  Stats: min:0.0 avg:81.8 max:1519.0 Ops/s



๐Ÿ“Š Disk Writes:
   18816 โ”ค            โ•ญโ”€โ•ฎ
   16465 โ”ค         โ•ญโ”€โ”€โ•ฏ โ•ฐโ•ฎ
   14113 โ”ค        โ•ญโ•ฏ     โ•ฐโ•ฎ
   11762 โ”ค   โ•ญโ•ฎ  โ•ญโ•ฏ       โ”‚
    9411 โ”ค   โ”‚โ”‚  โ”‚        โ”‚
    7059 โ”ค  โ•ญโ•ฏโ•ฐโ•ฎโ•ญโ•ฏ        โ•ฐโ•ฎ
    4708 โ”ค  โ”‚  โ”‚โ”‚          โ”‚
    2356 โ”ค โ•ญโ•ฏ  โ•ฐโ•ฏ          โ”‚                โ•ญโ”€โ”€โ”€โ•ฎ
       5 โ”ผโ”€โ•ฏ               โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
                              Disk Writes (Ops/s)
  Stats: min:4.0 avg:3373.4 max:19192.0 Ops/s



๐Ÿ“Š Network Received:
   934237025 โ”ค โ•ญโ•ฎ
   817458485 โ”ค โ”‚โ”‚     โ•ญโ”€โ•ฎ
   700679945 โ”ค โ”‚โ”‚    โ•ญโ•ฏ โ”‚
   583901406 โ”คโ•ญโ•ฏโ”‚    โ”‚  โ”‚
   467122866 โ”คโ”‚ โ•ฐโ•ฎ   โ”‚  โ”‚
   350344327 โ”คโ”‚  โ”‚  โ•ญโ•ฏ  โ•ฐโ•ฎ
   233565787 โ”ผโ•ฏ  โ”‚  โ”‚    โ”‚
   116787247 โ”ค   โ”‚  โ”‚    โ”‚
        8708 โ”ค   โ•ฐโ”€โ”€โ•ฏ    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
                                Network Received (Bytes)
  Stats: min:8707.0 avg:91377905.1 max:950344235.0 Bytes



๐Ÿ“Š Network Sent:
   1866827 โ”ผโ•ฎ
   1634232 โ”คโ”‚
   1401638 โ”คโ•ฐโ•ฎ
   1169043 โ”ค โ”‚
    936449 โ”ค โ•ฐโ•ฎ
    703854 โ”ค  โ”‚    โ•ญโ”€โ”€โ•ฎ
    471259 โ”ค  โ•ฐโ•ฎ  โ•ญโ•ฏ  โ”‚
    238665 โ”ค   โ”‚  โ”‚   โ•ฐโ•ฎ                        โ•ญโ•ฎ
      6070 โ”ค   โ•ฐโ”€โ”€โ•ฏ    โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏโ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
                                Network Sent (Bytes)
  Stats: min:6068.0 avg:159559.6 max:1866827.0 Bytes

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@v2
        with:
          sccache: s3
      - uses: mozilla-actions/sccache-action@v0.0.9
      - run: # your slow rust compilation

Possible values:

  • s3 - Use RunsOn S3 cache bucket for sccache backend
  • Empty string - Disable sccache configuration (default)

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 ?