Skip to content
Latchkey

Download AWS IP ranges workflow (quay/quay)

The Download AWS IP ranges workflow from quay/quay, explained and optimized by Latchkey.

A

CI health: A - excellent

Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: quay/quay.github/workflows/aws-ip-json.yamlLicense Apache-2.0View source

What it does

This is the Download AWS IP ranges workflow from the quay/quay repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Download AWS IP ranges

on:
  # push:
  #   paths:
  #     - .github/workflows/aws-ip-json.yml # run workflow every time this file changes
  workflow_dispatch:
  # unschedule for now. we must wait until the flat action can open a PRs,
  # then set it to do so against master.
  # this means this workflow needs to run manually against the target branches.
  # schedule:
  #   - cron: '0 0 * * *'

permissions:
  contents: write

jobs:
  scheduled:
    runs-on: ubuntu-latest
    steps:
      - name: Check out repo
        uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

      - name: Fetch data
        uses: githubocto/flat@fc34373cc20b987e89d75d96435a9fecd8fb0807 # v3
        with:
          http_url: https://ip-ranges.amazonaws.com/ip-ranges.json
          downloaded_filename: util/ipresolver/aws-ip-ranges.json

The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Download AWS IP ranges
 
on:
  # push:
  #   paths:
  #     - .github/workflows/aws-ip-json.yml # run workflow every time this file changes
  workflow_dispatch:
  # unschedule for now. we must wait until the flat action can open a PRs,
  # then set it to do so against master.
  # this means this workflow needs to run manually against the target branches.
  # schedule:
  #   - cron: '0 0 * * *'
 
permissions:
  contents: write
 
jobs:
  scheduled:
    timeout-minutes: 30
    runs-on: latchkey-small
    steps:
      - name: Check out repo
        uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
 
      - name: Fetch data
        uses: githubocto/flat@fc34373cc20b987e89d75d96435a9fecd8fb0807 # v3
        with:
          http_url: https://ip-ranges.amazonaws.com/ip-ranges.json
          downloaded_filename: util/ipresolver/aws-ip-ranges.json
 

What changed

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow