Skip to content
Latchkey

Detect Upstream Package Updates workflow (nickrunning/wechat-selkies)

The Detect Upstream Package Updates workflow from nickrunning/wechat-selkies, 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: nickrunning/wechat-selkies.github/workflows/detect-upstream.ymlLicense MITView source

What it does

This is the Detect Upstream Package Updates workflow from the nickrunning/wechat-selkies repository, a real project running GitHub Actions. It is shown here with attribution under its MIT license.

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

The workflow

workflow (.yml)
name: Detect Upstream Package Updates

on:
  workflow_dispatch:
  schedule:
    - cron: '23 */6 * * *'

permissions:
  contents: write

jobs:
  detect-wechat-updates:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Detect upstream package changes
        id: detect
        run: ./.github/scripts/detect-upstream.sh

      - name: Commit updated version state
        if: steps.detect.outputs.changed == 'true'
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git add versions/upstream.env
          git commit -m "chore: update upstream package state"
          git push

The same workflow, on Latchkey

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

name: Detect Upstream Package Updates
 
on:
  workflow_dispatch:
  schedule:
    - cron: '23 */6 * * *'
 
permissions:
  contents: write
 
jobs:
  detect-wechat-updates:
    timeout-minutes: 30
    runs-on: latchkey-small
 
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
 
      - name: Detect upstream package changes
        id: detect
        run: ./.github/scripts/detect-upstream.sh
 
      - name: Commit updated version state
        if: steps.detect.outputs.changed == 'true'
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git add versions/upstream.env
          git commit -m "chore: update upstream package state"
          git push
 

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