Skip to content
Latchkey

Publish Release workflow (node-red/node-red)

The Publish Release workflow from node-red/node-red, explained and optimized by Latchkey.

B

CI health: B - good

Point runs-on at Latchkey and get caching, SHA-pinned actions, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: node-red/node-red.github/workflows/release.ymlLicense Apache-2.0View source

What it does

This is the Publish Release workflow from the node-red/node-red 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: Publish Release
env:
  ACTIONS_ALLOW_UNSECURE_COMMANDS: true
on:
  release:
    types: [published]

permissions:
  contents: read

jobs:
  generate:
    name: 'Update node-red-docker image'
    runs-on: ubuntu-latest
    steps:
      - name: Check out node-red repository
        uses: actions/checkout@v4
        with:
            path: 'node-red'
      - name: Check out node-red-docker repository
        uses: actions/checkout@v4
        with:
            repository: 'node-red/node-red-docker'
            path: 'node-red-docker'
      - name: Check out node-red.github.io repository
        uses: actions/checkout@v4
        with:
            repository: 'node-red/node-red.github.io'
            path: 'node-red.github.io'
      - uses: actions/setup-node@v4
        with:
            node-version: '16'
      - run: node ./node-red/.github/scripts/update-node-red-docker.js
      - name: Create Docker Pull Request
        uses: peter-evans/create-pull-request@v6
        with:
          token: ${{ secrets.NR_REPO_TOKEN }}
          committer: GitHub <noreply@github.com>
          author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
          path: 'node-red-docker'
          commit-message: 'Bump to ${{ env.newVersion }}'
          title: 'πŸš€ Update to Node-RED ${{ env.newVersion }} release'
          body: |
            Updates the Node-RED Docker repo for the ${{ env.newVersion }} release.

            Once this is merged, you will need to create a new release with the tag `v${{ env.newVersion }}`.

            This PR was auto-generated by a GitHub Action. Any questions, speak to @knolleary
      - run: node ./node-red/.github/scripts/update-node-red-website.js
      - name: Create Website Pull Request
        uses: peter-evans/create-pull-request@v6
        with:
          token: ${{ secrets.NR_REPO_TOKEN }}
          committer: GitHub <noreply@github.com>
          author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
          path: 'node-red.github.io'
          commit-message: 'Bump to ${{ env.newVersion }}'
          title: 'πŸš€ Update to Node-RED ${{ env.newVersion }} release'
          body: |
            Updates the Node-RED Website repo for the ${{ env.newVersion }} release.

            This PR was auto-generated by a GitHub Action. Any questions, speak to @knolleary

The same workflow, on Latchkey

Estimated ~20% faster on cache hits, plus fewer wasted runs and a safer supply chain. Added and changed lines are highlighted.

name: Publish Release
env:
  ACTIONS_ALLOW_UNSECURE_COMMANDS: true
on:
  release:
    types: [published]
 
permissions:
  contents: read
 
jobs:
  generate:
    name: 'Update node-red-docker image'
    runs-on: latchkey-small
    steps:
      - name: Check out node-red repository
        uses: actions/checkout@v4
        with:
            path: 'node-red'
      - name: Check out node-red-docker repository
        uses: actions/checkout@v4
        with:
            repository: 'node-red/node-red-docker'
            path: 'node-red-docker'
      - name: Check out node-red.github.io repository
        uses: actions/checkout@v4
        with:
            repository: 'node-red/node-red.github.io'
            path: 'node-red.github.io'
      - uses: actions/setup-node@v4
        with:
          cache: 'npm'
            node-version: '16'
      - run: node ./node-red/.github/scripts/update-node-red-docker.js
      - name: Create Docker Pull Request
        uses: peter-evans/create-pull-request@v6
        with:
          token: ${{ secrets.NR_REPO_TOKEN }}
          committer: GitHub <noreply@github.com>
          author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
          path: 'node-red-docker'
          commit-message: 'Bump to ${{ env.newVersion }}'
          title: 'πŸš€ Update to Node-RED ${{ env.newVersion }} release'
          body: |
            Updates the Node-RED Docker repo for the ${{ env.newVersion }} release.
 
            Once this is merged, you will need to create a new release with the tag `v${{ env.newVersion }}`.
 
            This PR was auto-generated by a GitHub Action. Any questions, speak to @knolleary
      - run: node ./node-red/.github/scripts/update-node-red-website.js
      - name: Create Website Pull Request
        uses: peter-evans/create-pull-request@v6
        with:
          token: ${{ secrets.NR_REPO_TOKEN }}
          committer: GitHub <noreply@github.com>
          author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
          path: 'node-red.github.io'
          commit-message: 'Bump to ${{ env.newVersion }}'
          title: 'πŸš€ Update to Node-RED ${{ env.newVersion }} release'
          body: |
            Updates the Node-RED Website repo for the ${{ env.newVersion }} release.
 
            This PR was auto-generated by a GitHub Action. Any questions, speak to @knolleary
 

What changed

1 third-party action is referenced by a movable tag. Pin it to the commit SHA (Latchkey resolves and applies this automatically) so a repointed tag cannot change what runs.

What Latchkey heals here

This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:

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